Forum Discussion

kumar25's avatar
kumar25
New Contributor II
3 years ago

Timestamp conversion from UTC to EST

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

  • 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:

    BR,
    Marjan

  • darshthakkar's avatar
    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.