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

Milliseconds to Date

gaurav_sandil
New Contributor III

Hi ,

I want to convert Milliseconds to Date.
For instance If I give 1540456849550 then it should give me the date like Thu 25 October 2018 14:10:49

Thanks,
Gaurav Sandil

6 REPLIES 6

Anil
New Contributor III

@gaurav.sandil

Use below expression in mapper to achieve it.

Date.parse(1540456849550).toLocaleDateTimeString({โ€œformatโ€:โ€œE dd MMMMM yyyy HH:mm:ssโ€})

abirenzi
New Contributor II

Following expression in mapper worked for me. In case your millisec are in string format, parse them first in float then date:
Date.parse(parseFloat($endDateTime)).toLocaleDateString({โ€œformatโ€:โ€œEEE, d MMM yyyy HH:mm:ssโ€})