08-26-2021 01:17 AM
Hi All,
I am trying change a date format with expression.
Input is a string value: “04/23/2021 12:00:00 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($CertActivityDate,“mm/dd/yyyy hh:mm:ss AM”).toLocaleDateTimeString( { “format”:“yyyy-MM-dd HH:mm:ss” } )
Could you please siggest.
08-26-2021 01:22 AM
Hi @Shrabanti,
Use the following expression:
Date.parse("04/23/2021 12:00:00 AM","MM/dd/yyyy HH:mm:ss a").toLocaleDateTimeString({"format":"yyyy-MM-dd HH:mm:ss"})
Regards,
Bojan
08-26-2021 01:53 AM
@bojanvelevski Thank you it worked.
Could you please also point me where I can see all different time formats.
Thanks & Regards,
Shrabanti
08-26-2021 02:04 AM
08-26-2021 08:22 AM