ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMS TIMESTAMP

Post new topic  Reply to topic
 JMS TIMESTAMP « View previous topic :: View next topic » 
Author Message
ravi_sri24
PostPosted: Wed Apr 18, 2007 7:44 am    Post subject: JMS TIMESTAMP Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

Hi,

From the JMS
JMSTimestamp value is coming like this 1176908752051

Please can any one suggest me how to convert this to GMTTIMESTAMP in MB by using the ESQL code

Regards,
Ravi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 18, 2007 2:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

This is a millisecond interval value from some date in 1970 ? see Date(java.lang.long)

So deal with it in this manner...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Apr 18, 2007 2:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Is it not already an ESQL Timestamp?

Maybe you can CAST it to one?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Apr 19, 2007 12:33 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

DECLARE tValue DECIMAL;
DECLARE tValue1 DECIMAL;
DECLARE tValue2 TIMESTAMP;
DECLARE tValue3 TIMESTAMP;
DECLARE tValue4 TIMESTAMP;
DECLARE N INTERVAL;

SET tValue3 = '1970-01-01 00:00:00';

SET tValue1 = CAST(InputRoot.MQRFH2.jms.Tms AS DECIMAL);
SET tValue1 = tValue1/1000;

SET N = CAST(tValue1 AS INTERVAL SECOND);
SET tValue4 = tValue3 + N ;


tValue4 is the timestamp
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMS TIMESTAMP
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.