anubhav_nautiya
6 years agoContributor
Converting Datetime with AM/PM to 24Hr date format
Hi, I have a requirement where from the source file. I am getting date as string value ‘10/21/2019 6:16:54 PM’, I want the date to be converted into yyyy-mm-dd hh:mm:ss format.
In the example given...
- 6 years ago
Hi Chris,
Thanks for your inputs, I was able to achieve this by using the expression below,
Date.parse($dt,‘MM/dd/yyyy h:m:s a’).toLocaleDateTimeString({“format”:“yyyy-MM-dd HH:mm:ss”})Regards
Anubhav