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 date convertion in Mapping Node issue

Post new topic  Reply to topic
 dateTime to date convertion in Mapping Node issue « View previous topic :: View next topic » 
Author Message
dziku007
PostPosted: Tue Nov 12, 2019 6:35 am    Post subject: dateTime to date convertion in Mapping Node issue Reply with quote

Apprentice

Joined: 26 Jul 2012
Posts: 32

Hi,

I have strange dateTime to date convertion results using Mapping Node. It seems to happen using dates before year 1600 AD. Using "Convert" function the results are:
Code:

input:1555-01-01T12:30:00  output:1554-12-12
input:1055-01-01T12:30:00  output:1054-12-20
input:0055-01-01T12:30:00  output:0055-01-05
input:0001-01-01T12:30:00  output:0001-01-05




What's more intresting using Compute node with mapping:
Code:

      DECLARE retDate DATE;
      DECLARE pattern CHARACTER 'yyyy-MM-dd';
      
      DECLARE inDateTime TIMESTAMP;
      SET inDateTime = InputRoot.SOAP.Body.*:InDateTime;   

      SET retDate = CAST (inDateTime AS DATE FORMAT pattern );
      SET OutputRoot.SOAP.Body.ns:retDate = retDate;
      RETURN TRUE;


Results are correct
Code:

input:1555-01-01T12:30:00  output:1555-01-01
input:1055-01-01T12:30:00  output:1055-01-01
input:0055-01-01T12:30:00  output:0055-01-01
input:0001-01-01T12:30:00  output:0001-01-01


But when I use the same transformation in "custom esql" in mapping node I still gets the same strange results as using "Convert" function.

Do You have an idea where is the point? Is it something with gregorian calendar?

I am using IIB 9.0.0.10
Thanks for any answer.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 12, 2019 8:39 am    Post subject: Re: dateTime to date convertion in Mapping Node issue Reply with quote

Grand High Poobah

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

dziku007 wrote:
It seems to happen using dates before year 1600 AD.


You might want to circle back with your audit people about their data retention policies.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
dziku007
PostPosted: Tue Nov 12, 2019 12:24 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Jul 2012
Posts: 32

No, we are trying to migrate to ESB processes from the order of the Templar Knights
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Nov 13, 2019 2:34 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Calendars were not standardised in different countries until quite recently. There was a major change in 1582. This could explain unexpected date conversions during this period.

https://www.timeanddate.com/calendar/julian-gregorian-switch.html
_________________
Glenn
Back to top
View user's profile Send private message
dziku007
PostPosted: Thu Nov 14, 2019 1:00 am    Post subject: Reply with quote

Apprentice

Joined: 26 Jul 2012
Posts: 32

Thank you, that seems to be the reason, the broker results with dates that shows the real dates that includes julian -> gregorian calendar shift,
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 to date convertion in Mapping Node issue
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.