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 » casting timestamp issue

Post new topic  Reply to topic
 casting timestamp issue « View previous topic :: View next topic » 
Author Message
WMBSAM
PostPosted: Thu Mar 14, 2013 6:36 am    Post subject: casting timestamp issue Reply with quote

Voyager

Joined: 02 Oct 2009
Posts: 90
Location: Atlanta

trying to convert timestamp format from 2013-02-09 00:00:58.631 to 2013-02 -09T00:00:58.000Z

Here is what code looks like:

SET target = CAST(inputdatetime AS TIMESTAMP FORMAT 'M/d/yy HH:mm');

here target value comes as 2013-02-09 00:00:58.631



SET target.Date = CAST(target as TIMESTAMP FORMAT 'IU');

any thoughts??
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 14, 2013 6:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

A broker timestamp has no physical format.

You are attempting to instruct a broker timestamp on what it's physical format is.

You need to instruct broker on the physical format of the data you are creating or serializing the timestamp from and to.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 14, 2013 7:20 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

mqjeff is correct.

You need to cast the input string to a timestamp using format1, then cast the timestamp to a string using format2. That's not what your code is currently doing
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 » casting timestamp issue
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.