Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
6.4.1
I have a tHMap mapper map; that is throwing this error at runtime:
20: Error - The specified date/time does not match the specified pattern. (336)
Map: /DIH_PENDINGBUSINESS/Maps/case_mapping.xml - Map Element: out$/Root/applicationReceivedDate
Pattern - EEE MMM dd HH:mm:ss z yyyy
Value: Fri Oct 20 05:00:00 UTC 2017
The value above is being passed as a jSon String property.
I am not seeing anything wrong with the above pattern; and why it is not matching.
When I run this in designtime; using the Mapper Test feature on the field; with the same input value; the design-time Test result for the field doesn't error; and returns back:
2017-10-20 as expected.
It is only failing at runtime with the above error.
Any ideas on why it is failing at runtime but works in testmode at design time?
Here are relevant screencaps from the mapper:
Input field is: hoReceiptDate; output field is applicationReceivedDate:
The input Json sample test value:
the output mapping Util logic:
the output mapping Value logic:
the designtime TestRun results:
I think ultimately the mapper's ParseDateTime function doesn't appear to provide a parameter for you to provide the locale.
Because of that; the ExtractFromDateTime is not working on the ParseDateTime above.
I changed my mapper expression to drop the use of the ParseDateTime function; and instead call the TalendDate.parseDateLocale function as follows, and it works fine at both TestRun (designtime) and at runtime:
Thanks server is usa not french.
Like I said above; the mapper 'test run output' works fine as expected at runtime for the same value that it is raising the error on at runtime (The specified date/time does not match the specified pattern.).
Anyone else seen this issue on Mapper converting a json string date in the format of 'Fri Oct 20 05:00:00 UTC 2017' into a json string date in the format of '2017-10-20'?
I think ultimately the mapper's ParseDateTime function doesn't appear to provide a parameter for you to provide the locale.
Because of that; the ExtractFromDateTime is not working on the ParseDateTime above.
I changed my mapper expression to drop the use of the ParseDateTime function; and instead call the TalendDate.parseDateLocale function as follows, and it works fine at both TestRun (designtime) and at runtime:
I am currently concatenating Start Date and Start Time from input to StartTS in output in Talend Data Mapper but both the field I am taking as String.
How should I change the datatype in output JSON to Date ??
Inputs needed please..