How do you convert a 10 digit unix time


I’m trying to pull content from an online EPG, and the Start and Stop times of programmes look to only be 10 digits long, and I can’t seem to use a date time converter node e.g. Moment to convert them ?

When I do paste the same numbers into to convert, that same 10 digit number was converted easily,

Here’s a picture of the data that’s returned (including the before and after attempt to convert the unix/epoch start and end times provided ), I’ve also added the flow overall


Simply multiply the UNIX time by 1000 and it is a valid JavaScript timestamp.

I have an array from a database with UNIX/epoch time format and I use this to convert all the timestamps in the array:

var i;
for (i = 0; i <msg.payload.length; i++) {

var now = new Date(msg.payload[i].TIMESTAMP).toLocaleString("en-GB");
msg.payload[i].TIMESTAMP = now;


return msg;