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 » ESQL Question

Post new topic  Reply to topic
 ESQL Question « View previous topic :: View next topic » 
Author Message
NiceGuy
PostPosted: Wed Jul 15, 2009 11:53 am    Post subject: ESQL Question Reply with quote

Apprentice

Joined: 11 Jun 2009
Posts: 37

Hello,

I am new to this site .. and actually quite new to ESQL. I am trying to take a string date input from one of my message broker nodes as such:

"31/05/09"

and want to convert/CAST it to a date type with a format as such

"31-05-2009"

Could someone help out?
Thanks
Back to top
View user's profile Send private message
jbanoop
PostPosted: Wed Jul 15, 2009 12:19 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Did you go through the info center and read the CAST function ?
Actually one of the sample snippets there does exactly what you have been asking for.

Code:
DECLARE source CHARACTER '31/05/09
DECLARE target DATE;
DECLARE pattern CHARACTER 'dd/MM/yy';
SET target = CAST(source AS DATE FORMAT pattern);


you can use the reverse cast (from date to the required char format) if you need to putput the date in a different format.

Next time have a look at infocenter and also try searching these forums for answers before starting a new thread.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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