Originally posted by: Ejay
Hello,
I'm sharing this small Java example, that can be called with a JEXIT(). I wrote this to allow the map to query the DST time offset depending on whether we are in Summer or Winter time.
It accepts both an input & output format and can be combined with the CURRENTDATETIME() function.
eg :
=VALID(JEXIT("EJ.TestCases.CalculateTimeZone","getTimeZone",DATETOTEXT(CURRENTDATETIME("CCYYMMDDHH24MMSS+/-ZZ:ZZ")),"yyyyMMddHHmmssXXX!yyyy-MM-dd'T'HH:mm:ss.SSSXXX"),
FAIL(LASTERRORMSG()+LASTERRORCODE())))
All the required instructions and an example usage are in the comments in the WTX map source.
Attached : Java code, compiled JAR, Typetree and map usage example.
Hope that can help.
EJ
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange