[Edit]
+
0
-
0
js get current timestamp using moment.js
1 2 3 4 5 6 7 8 9const moment = require('moment'); // get current timestamp: const now = moment().toISOString(); console.log(now); // Example output: // 2022-01-31T20:04:41.285Z
1 2 3 4 5 6 7 8 9const moment = require('moment'); // get current timestamp: const now = moment().toISOString(); console.log(now); // Example output: // 2022-01-31T20:04:41.285Z