cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Timestamp conversion from UTC to EST

kumar25
New Contributor II

Hi,

I am getting error while converting Datetime value from UTC to EST, suggest the expression for below UTC date value.

2021-10-25 04:00:00

2 REPLIES 2

marjan_karafilo
Contributor

Hi @kumar25,

Can you try this expression:

Date.parse(โ€œ2021-10-25 04:00:00โ€).toLocaleDateTimeString({โ€œtimeZoneโ€:โ€œAmerica/New_Yorkโ€, โ€œformatโ€:โ€œyyyy-MM-dd HH:mm:ssโ€})

Donโ€™t forget to replace the double quotes:
image

BR,
Marjan

darshthakkar
Valued Contributor

@kumar25: The solution given by @marjan.karafiloski should work as I would have given the same solution.

I agree to @marjan.karafiloskiโ€™s point that while copying the logic, youโ€™ll have to explicitly remove the double quotes and put it back as it will give you an error, if you donโ€™t do it.