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 getting Converted into UTC

Post new topic  Reply to topic
 DateTime getting Converted into UTC « View previous topic :: View next topic » 
Author Message
akulavijay
PostPosted: Mon Feb 27, 2017 7:49 pm    Post subject: DateTime getting Converted into UTC Reply with quote

Newbie

Joined: 17 Jul 2014
Posts: 9

Hi All,
I am trying to convert DateTime field in the request into a String format as expected by the backend server. I am using mapping node as there are many other fields being mapped. From the mapper a Custom ESQL function is being called with following code
Code:
CREATE FUNCTION ConvertToString (IN inputDateTime TIMESTAMP) RETURNS CHAR
BEGIN
   RETURN CAST(inputDateTime AS CHARACTER FORMAT 'yyyyMMdd''T''HHmmss');
END;

2016-11-04T21:55:34+13:00 is resulting in 20161104T215534, as expcted
and 2016-11-04T21:55:34Z is resulting in 20161105T105534, as expcted but
2016-11-04T21:55:34 is also resulting in 20161105T105534. This means when there is no Z or offset in the DateTime field WMB is converting the DateTime into UTC when the mapper calls the ESQL Function. Is it due to any setting (configurable service) at the Broker level. Please advice.
Thanks in advance
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Feb 27, 2017 11:03 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.

There is a who page (or two) in the documentation on Timestamp Conversion formats.
You can force the inclusion of the Zulu offset if you so wish by using the correct string. You are almost there with your example but there are some shortform templates that may make your job easier.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DateTime getting Converted into UTC
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.