Javascript - Convert a Timestamp string to human date format


I have the following information:

Timestamp: 1481751645.455596

I want to convert it to the following format: Wed, 14 Dec 2016 21:40:45 GMT. I used the following website: link to be able to verify that the Timestamp format that I show you is correct and yes, it is correct. Any ideas?

asked by Ricky 15.12.2016 в 13:44

1 answer


You can try

var unix_date = 1481751645.455596;
var date = new Date(unix_date * 1000);
answered by 15.12.2016 / 13:50