get current timestamp code example
Example 1: return current date in javascript
let today = new Date().toLocaleDateString()
console.log(today)
Example 2: get current timestamp shell
timestamp=$(date +%s)
Example 3: how to get timestamp in javascript of a date object
new Date().getTime()
new Date().valueOf()
Example 4: javascript get timestamp
var currentTimeInSeconds=Math.floor(Date.now()/1000);
var currentTimeInMilliseconds=Date.now();
Example 5: how to get the timestamp in javascript
const currentTimeInMilliseconds=Date.now();
Example 6: convert int to timestanp js
Date.now()
and
new Date(1381216317325);