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 » milliseconds to timestamp

Post new topic  Reply to topic
 milliseconds to timestamp « View previous topic :: View next topic » 
Author Message
kumar_eee07
PostPosted: Wed Sep 15, 2010 5:48 am    Post subject: milliseconds to timestamp Reply with quote

Newbie

Joined: 14 Jun 2010
Posts: 5

how to convert milliseconds to timestamp in esql in mb .please help .it is very urgent

input format:196928775582 (value in milli seconds)
output format : YYYY-MM-DDThh:mm:ss.SSS
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 15, 2010 5:56 am    Post subject: Re: milliseconds to timestamp Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kumar_eee07 wrote:
how to convert milliseconds to timestamp in esql in mb


What have you already tried? There's no point us suggesting code that's already not worked for you.

The obvious method is divide by 1000 to obtain seconds, then use the ESQL to convert that (AFAIK you can't go directly to that ISO timestamp format but I'll be corrected on that).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Sep 15, 2010 6:49 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

To give you some hints, you need to realize that MQ message timestamps are not measured in millis. There are also two parts to an MQ message timestamp: Date and Time. These two values are oriented to Zulu time.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER


Last edited by lancelotlinc on Thu Sep 16, 2010 5:21 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
francoisvdm
PostPosted: Wed Sep 15, 2010 9:32 pm    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Gosh lancelotlinc, tone down your tone please! Clearly Kumar is a newbie here! And what on earth makes you think his question has to do with MQ messages time and date stamps. If you can't or won't help, please refrain from making negative statements like yours....just move on and add some real value somewhere else. If you want to demonstrate your superior knowledge the give an answer, not a snotty remark that wastes everybody else's time.
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
SANTYP
PostPosted: Thu Sep 16, 2010 1:17 am    Post subject: Reply with quote

Centurion

Joined: 27 Mar 2007
Posts: 142

i think u can try with below format

yyyy-MM-dd'T'HHmmssZZZ
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Sep 16, 2010 6:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

@francoisvdm

Ok, toned.

I highly recommend new developers take VM663 or equivalent.

http://www-304.ibm.com/jct03001c/services/learning/ites.wss/us/en?pageType=course_description&courseCode=VM663

The Apache / Linux / OpenSource / GPL style learning curve is less well suited to IBM WebSphere Message Broker. People tend to be lost unless some exposure to the training labs, either in classroom or virtually.

Your point about being helpful to new resources is well taken on this side. Thank you for reminding me.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
francoisvdm
PostPosted: Thu Sep 16, 2010 11:14 pm    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Thanks Sir Lancelot
This is such a fantastic forum and the newbies are feeding the site... And on that course, I often give that course in the classroom situation, I can recommend it. In fact, I gave that course (the classroom version) last week to 8 students in Cape Town.

Regards
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
Luke
PostPosted: Thu Sep 16, 2010 11:54 pm    Post subject: Reply with quote

Centurion

Joined: 10 Nov 2008
Posts: 128
Location: UK

kumar_eee07 wrote:
how to convert milliseconds to timestamp in esql in mb .please help .it is very urgent

input format:196928775582 (value in milli seconds)
output format : YYYY-MM-DDThh:mm:ss.SSS


Hi

Going back to the original question, I don't have direct experience with a date in this format, but is it one of those things where it represents the number of miliseconds since Jan 1st 1970?

If it's something like that, then I guess you can divide the miliseconds by 1000 (as per Vitor's post), and CAST that to an interval. Declare a Timestamp for Jan 1st 1970 (or whenever), and add the interval. You can then CAST the timestamp to whatever output format you require (as per SANTYP's post)

Or maybe you've already found a better way, or maybe I've misunderstood the question?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » milliseconds to 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.