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 » DATETIME to yyyyMMdd format

Post new topic  Reply to topic
 DATETIME to yyyyMMdd format « View previous topic :: View next topic » 
Author Message
brokendrum
PostPosted: Fri Feb 28, 2003 8:23 am    Post subject: DATETIME to yyyyMMdd format Reply with quote

Apprentice

Joined: 14 Jan 2003
Posts: 34

I'm trying to output a DATETIME format as yyyyMMdd but I still get the DATETIME (yyyy-MM-dd hh:mm:ss) in the outbound XML message. I've declared the <ValueDate> XML element in the MRM as a type of DATETIME and the Format as yyyyMMdd.

Any help would be greatly appreciated!

Thanks.
Back to top
View user's profile Send private message
yaakovd
PostPosted: Fri Feb 28, 2003 8:50 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

I'm using following:
Code:
XXX = CAST(EXTRACT(YEAR FROM  CURRENT_DATE) AS CHARACTER)  ||
                SUBSTRING((CAST(100 + EXTRACT(MONTH FROM  CURRENT_DATE)AS CHARACTER)) FROM 2 FOR 3) ||
                SUBSTRING((CAST(100 + EXTRACT(DAY FROM  CURRENT_DATE)AS CHARACTER)) FROM 2 FOR 3)

You can use any date instead of CURRENT_DATE.
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
brokendrum
PostPosted: Fri Feb 28, 2003 9:04 am    Post subject: Reply with quote

Apprentice

Joined: 14 Jan 2003
Posts: 34

That would probably work, but can you not define the date format in the MRM that you want the DATETIME to be output in? It reads yymmdd when it parses the input message and expresses it as DATETIME yyyy-mm-dd hh:mm:ss in the message tree. I want to use the reverse function of this.
Back to top
View user's profile Send private message
yaakovd
PostPosted: Fri Feb 28, 2003 9:14 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

Actually, in my application I always send/receive Date as String.
If I need to compare it with CURRENT_DATE or Date from DB, I convert it.
So, also in your MRM you can define it as String.

Or you can create functions (in 2.1) Date to String and vice versa, special if you have single date format.
For reverse function you can use SUBSTRING.
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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