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 » CURRENT_TIMESTAMP Problems with milliseconds

Post new topic  Reply to topic
 CURRENT_TIMESTAMP Problems with milliseconds « View previous topic :: View next topic » 
Author Message
Luca81
PostPosted: Fri Feb 01, 2008 5:02 am    Post subject: CURRENT_TIMESTAMP Problems with milliseconds Reply with quote

Acolyte

Joined: 01 Mar 2007
Posts: 62

Hi all,

we are migrating to Message Broker V6.
CURRENT_TIMESTAMP in V5 was in this format:

yyyy-mm-dd hh:mm:ss.fff

Now, in V6 is

yyyy-mm-dd hh:mm:ss.ffffff

And this is a problem for our applications.

This was the code in V5

SET OutputRoot.XMLNS.Header.Timestamp = CURRENT_TIMESTAMP

Output was like this
OutputRoot.XMLNS.Header.Timestamp = '2008-01-10 12:01:20.141'

In v6 the Output is like this
OutputRoot.XMLNS.Header.Timestamp = '2008-01-10 12:01:20.141453'

I need the old format...
So I used this code
CAST(CURRENT_TIMESTAMP AS CHARACTER FORMAT 'yyyy-MM-dd HH:mm:ss.SSS');

It works fine.
But I have a question, can't I use the FORMAT without the CAST?
I'd like a TIMESTAMP in the old format (yyyy-mm-dd hh:mm:ss.fff) without casting. Is it possibile? Or Have I to use this code?

DECLARE target TIMESTAMP;
SET target = CAST(CURRENT_TIMESTAMP AS TIMESTAMP FORMAT 'yyy-MM-dd HH:mm:ss');


Thx a Lot
Luca
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 01, 2008 1:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If you are using self defined xml you will have to use the cast.
If you are using a message set you should be able to define the format at the element level or at the set level using the element level as an override...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Luca81
PostPosted: Mon Feb 04, 2008 12:47 am    Post subject: Reply with quote

Acolyte

Joined: 01 Mar 2007
Posts: 62

fjb_saper wrote:
If you are using self defined xml you will have to use the cast.
If you are using a message set you should be able to define the format at the element level or at the set level using the element level as an override...

Enjoy


Yes, I use a self defined XML...
I will use the cast.
thx you.
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 » CURRENT_TIMESTAMP Problems with milliseconds
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.