Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to get some help on the issue I am trying to fix.
I am using the tMap component and trying to convert the date value of a column from "yyyy-MM-dd'T'HH:mm:ss'.000Z'" to "yyyymmdd" date format. I tried to use the syntax below but it won't work.
TalendDate.formatDate("yyyymmdd",row1.DateStamp)
I even changed the Data Type to String in the tMap Output still it won't work.
If I forced the required format ("yyyymmdd") in the "Date Pattern" field in tMap it was giving me an incorrect value such as "20213912" instead of "20220612".
Do you have any idea on this how to fix it?
Thank you much in advance.
Hello Mitz,
Regarding to your above error, seems the input column type is 'Date'? if yes, please setup the tMap output value to row1.DateStamp as the below
Hello,
in the tMap output, you can setup the column value to TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",row1.DateStamp ) , the column type to 'Date' with Date pattern: "yyyyMMdd" as the below
Thank you so much, Achen.
I tried to apply your solution but, I got the error below.
Hello Mitz,
Regarding to your above error, seems the input column type is 'Date'? if yes, please setup the tMap output value to row1.DateStamp as the below
Thanks Achen.
It works now. Thanks for your help. 👍