Forum Discussion
$Expire_Date.toLocaleDateTimeString({format: "yyyy-MM-dd'T'hh:mm:ss'EST'"})
@darshthakkar Can try this option- .toLocaleDateTimeString({“format”:“YYYY-MM-dd’T’HH:mm:ss z”,“timeZone”:“IST”}) will give you “2022-08-16T12:06:55 IST” format.
- darshthakkar3 years agoValued Contributor
Thank you @Supratim, I was able to test this out and it worked!
- VaishnaviB2 years agoNew Contributor
Hi Supratim ,
Can you please help me on this.
I have tried as mentioned
Date.now().toLocaleDateTimeString({“format”:“YYYY-MM-dd'T'HH:mm:ss z”,“timeZone”:“IST”})
which is giving me in UTC as below
_snaptype_datetime:"2024-03-12T09:15:05.038 UTC"
- ramaonline2 years agoAdmin
Try the below expression:
Date.now().toLocaleDateTimeString({"timeZone":"Asia/Kolkata", "format":"yyyy-MM-dd HH:mm"})
Reference:
For the {"timeZone":"zoneValue"} option, you can use the Canonical ID value from Joda-Time.