When the information arrives to my API it arrives with the Unix formatTimeStamp
For example: 1535440000
I need to convert this format to YYYY-mm-ddTHH:MM:ssZ
eg: 2018-05-31T16:49:27.698Z
.
I am working on JavaScript and MongoDB. Is there a function to perform this transformation?
Greetings and thank you
In
javascript
you multiply the value by 1000 to get the time in milliseconds and you gettoISOString
the date in ISO8601 format.Origin here .