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 » transform arbitrarily timestamp of type dateTime

Post new topic  Reply to topic
 transform arbitrarily timestamp of type dateTime « View previous topic :: View next topic » 
Author Message
Chewbacca
PostPosted: Wed Dec 11, 2013 7:37 am    Post subject: transform arbitrarily timestamp of type dateTime Reply with quote

Newbie

Joined: 22 Jul 2009
Posts: 1

Hi there!
Is there a simple way of transforming an arbitrarily timestamp of type dateTime into an MEZ timestamp of type dateTime

On InputRoot everything is allowed which is confirm with type=dateTime, every timezone is possible
e.g.
2013-06-14T12:50:50.352+1:00
2013-06-14T12:50:50+1:00
2013-06-14T12:50:50.352+2:00
2013-06-14T12:50:50.352-09:00
2013-06-14T12:50:50.352+05:00

On OutputRoot I need to transform it on the MEZ timezone => 2013-06-14T12:50:50.352+1:00

Any suggestion would be helpfull.
Thanks.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 11, 2013 1:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Ah, you mean CET. Most people here wouldn't understand that MEZ is the german representation of CET (UTC+1 or UTC+2)

You could think about converting the incoming time to GMT/UTC and then adding the LOCAL_TIMEZONE to that value.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 12, 2013 10:58 am    Post subject: Re: transform arbitrarily timestamp of type dateTime Reply with quote

Grand High Poobah

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

Chewbacca wrote:
Hi there!
Is there a simple way of transforming an arbitrarily timestamp of type dateTime into an MEZ timestamp of type dateTime

On InputRoot everything is allowed which is confirm with type=dateTime, every timezone is possible
e.g.
2013-06-14T12:50:50.352+1:00
2013-06-14T12:50:50+1:00
2013-06-14T12:50:50.352+2:00
2013-06-14T12:50:50.352-09:00
2013-06-14T12:50:50.352+05:00

On OutputRoot I need to transform it on the MEZ timezone => 2013-06-14T12:50:50.352+1:00

Any suggestion would be helpfull.
Thanks.


I don't understand your requirement.
The Timestamp is correct. Changing the time and offset to still match is a cosmetic requirement and should be handled by the front end. I usually use java for this. Mind you, if you use the broker the java DateFormat class is not threadsafe... (Use threadlocal)

Timestamps on the broker should be only handled in GMT.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
msiegert
PostPosted: Wed Dec 18, 2013 4:18 am    Post subject: Reply with quote

Apprentice

Joined: 05 Aug 2001
Posts: 29

Hi!
Thanks for your replies.
My requirement is that I need to calculate/transform/convert ...
an incoming dateTime
e.g.
2013-12-10T07:54:55.033-06:00
to an outgoing dateTime
2013-12-10T14:54:55.033+01:00

What is the best function to do that
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 18, 2013 5:04 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

did you try what I suggested a week ago?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
msiegert
PostPosted: Wed Dec 18, 2013 6:15 am    Post subject: Reply with quote

Apprentice

Joined: 05 Aug 2001
Posts: 29

yes, but now I'm getting an error:

<Insert Type="5" Text="'2013-12-10T23:54:55.033+01:00'"></Insert><Insert Type="5" Text="GMTTIMESTAMP"></Insert><RecoverableException File="F:\build\S700_P\src\CommonServices\ImbTimeStampFormatter.cpp" Line="1954" Function="ImbTimeStampFormatter::parseData" Type="" Name="" Label="" Catalog="BIPmsgs" Severity="3" Number="3204" Text="Literal failed to match"><Insert Type="5" Text="2013-12-10T23:54:55.033+01:00"></Insert><Insert Type="5" Text="yyyy-MM-dd"T"HH:mm:ss.SSSZZZ">

while casting: SET (OutputRoot....date = CAST(OutputRoot....date AS GMTTIMESTAMP FORMAT 'yyyy-MM-dd"T"HH:mm:ss.SSSZZZ')
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 18, 2013 6:20 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Please don't post the same question in multiple threads.
I have answered you in the other thread but please continue the problem here.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
msiegert
PostPosted: Wed Dec 18, 2013 7:19 am    Post subject: Reply with quote

Apprentice

Joined: 05 Aug 2001
Posts: 29

thanks, the 'IU' advice helped.

The code:
SET OutputRoot...date =
CAST(OutputRoot...date AS GMTTIMESTAMP FORMAT 'IU') + LOCAL_TIMEZONE;

does what it should, finally pretty simple.

For any reason I've two profiles here, I guess I should delete one.
Back to top
View user's profile Send private message
LearningMB
PostPosted: Tue Jan 21, 2014 4:48 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2014
Posts: 9

What is IU here?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 21, 2014 6:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

LearningMB wrote:
What is IU here?


The format code. It's documented in the InfoCenter.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » transform arbitrarily timestamp of type dateTime
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.