1var timestamp = 1607110465663
2var date = new Date(timestamp);
3console.log(date.getTime())
4console.log(date)
1var currentTimeInSeconds=Math.floor(Date.now()/1000); //unix timestamp in seconds
2var currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds
1function toTimestamp(strDate){
2 var datum = Date.parse(strDate);
3 return datum/1000;
4}
5alert(toTimestamp('02/13/2009 23:31:30'));
6