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 » Problem CASTing timestamp string to ESQL TIMESTAMP variable

Post new topic  Reply to topic
 Problem CASTing timestamp string to ESQL TIMESTAMP variable « View previous topic :: View next topic » 
Author Message
gcauthon
PostPosted: Fri Jun 29, 2012 7:38 am    Post subject: Problem CASTing timestamp string to ESQL TIMESTAMP variable Reply with quote

Newbie

Joined: 29 Jun 2012
Posts: 2

I'm trying to read a timestamp value that is stored as so: 201205230858220 and cast it to a TIMESTAMP variable in ESQL, but I keep getting an invalid date error.

The ESQL looks like this:

DECLARE TS TIMESTAMP CAST(InputRoot.XMLNSC.TestInput.DateTimeValue AS TIMESTAMP FORMAT 'yyyyMMddHHMMssS');

The result is "Error 2521"... "Error while casting"... "Invalid date"... etc.

If I change the input string to "2012-05-23T08:58:22.0" and change the line of code like so:

DECLARE TS TIMESTAMP CAST(InputRoot.XMLNSC.TestInput.DateTimeValue AS TIMESTAMP FORMAT 'I');

Then it works... The only format I can get to work is the "I" format (which requires me to add coding to manually reformat the input string). Is there something I'm missing? How do I get the other custom format strings to work? There's nothing that I can see in the documentation that says my first line of code shouldn't work... Is this a bug in WMB?
Back to top
View user's profile Send private message
gcauthon
PostPosted: Fri Jun 29, 2012 7:45 am    Post subject: Reply with quote

Newbie

Joined: 29 Jun 2012
Posts: 2

Never mind... I just noticed that the minutes should be "mm"... not "MM".
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 » Problem CASTing timestamp string to ESQL TIMESTAMP variable
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.