Convert to timestamp examples
Let us consider the following unix timestamp.
let unixTimestamp = 1618447140;
Convert unix timestamp
console.log(new Date(unixTimestamp * 1000)); // Output: Thu Apr 15 2021 06:39:00 GMT+0600
Convert JS timestamp
let jsTimestamp = 1616695200000; // Output: Fri Mar 26 2021 00:00:00 GMT+0600