Answers for "how to calculate time from moment format"

1

moment calculate duration

moment
 .duration(moment(endTime, 'YYYY/MM/DD HH:mm')
 .diff(moment(startTime, 'YYYY/MM/DD HH:mm'))
 ).asHours()
Posted by: Guest on February-26-2021
1

moment date from timestamp

const moment = require('moment');

const timestamp = 1519482900000;
const formatted = moment(timestamp).format('L');

console.log(formatted); // "02/24/2018"
Posted by: Guest on December-13-2021

Code answers related to "how to calculate time from moment format"

Code answers related to "Javascript"

Browse Popular Code Answers by Language