Author |
Message
|
dziku007 |
Posted: Tue Nov 12, 2019 6:35 am Post subject: dateTime to date convertion in Mapping Node issue |
|
|
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 |
|
 |
Vitor |
Posted: Tue Nov 12, 2019 8:39 am Post subject: Re: dateTime to date convertion in Mapping Node issue |
|
|
 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 |
|
 |
dziku007 |
Posted: Tue Nov 12, 2019 12:24 pm Post subject: |
|
|
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 |
|
 |
gbaddeley |
Posted: Wed Nov 13, 2019 2:34 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
|
Back to top |
|
 |
dziku007 |
Posted: Thu Nov 14, 2019 1:00 am Post subject: |
|
|
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 |
|
 |
|