07-19-2021 06:18 AM
Hi All,
I am trying change a data format with expression.
Input is a string value: “9-JUN-21 10.06.39.000000 AM”
Output should be ‘yyyy-MM-dd HH:mm:ss’ format
I am trying data parse the incoming date format but unable find proper format for input date.
Date.parse($OrderDetailUpdateDate,“dd-MMM-yyyy’ 'HH:mm:ss.SSSXXX AM”).toLocaleDateTimeString({“format”:“yyyy-MM-dd HH:mm:ss”})
Could you please siggest.
07-19-2021 06:40 AM
Hi @Shrabanti - I think this is what you’re looking for:
Date.parse(“9-JUN-21 10.06.39.000000 AM”, “dd-MMM-YY hh.mm.ss.SSSSSS aa” ).toLocaleDateTimeString( { “format” : “yyyy-MM-dd HH:mm:ss” } )
SnapLogic date parsing using Joda formatting. Here is a good reference on the format strings:
https://www.joda.org/joda-time/key_format.html
07-19-2021 11:11 PM
Thank you it worked…