js timestamp
snippet in javascript

js timestamp

user1884

var timestamp = new Date().getTime();

js timestamp

user9510

var currentTimeInSeconds=Math.floor(Date.now()/1000); //unix timestamp in seconds
var currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds

how to get timestamp in javascript of a date object

user4649

new Date().getTime()

new Date().valueOf()

how to get the timestamp in javascript

user789

const currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds

get epoch timestamp js

user4920

Math.floor(Date.now() / 1000)

javascript today date in epoch

user8370

const start = Date.now(); 
/*gives the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.*/