JS TimeStamp
var timestamp = new Date().getTime();
GutoTrosla
var timestamp = new Date().getTime();
const ts = () => Math.floor(new Date().getTime() / 1000);
var timestamp = 1607110465663
var date = new Date(timestamp);
console.log(date.getTime())
console.log(date)
var currentTimeInSeconds=Math.floor(Date.now()/1000); //unix timestamp in seconds
var currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds
var timestamp = new Date().getTime();
console.log(timestamp);
function toTimestamp(strDate){
var datum = Date.parse(strDate);
return datum/1000;
}
alert(toTimestamp('02/13/2009 23:31:30'));