Milliseconds to Date

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

Gaurav Sandil

You can use Date.parse(millis) for that. You can read more about that here:

Hi Gaurav,

Please find the attached pipeline to achieve Milliseconds to Date conversion in the specified format.


Milliseconds to Date_2018_10_30.slp (4.8 KB)

Thanks a lot Srinivas. Its really helpful.

Thanks a lot for your quick response.


Use below expression in mapper to achieve it.

Date.parse(1540456849550).toLocaleDateTimeString({“format”:“E dd MMMMM yyyy HH:mm:ss”})

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”})