SyntaxFix
Write A Post
Hire A Developer
Questions
var start=moment(1541243900000); var end=moment(1541243942882); var duration = moment.duration(end.diff(startTime)); var hours = duration.asHours();
As you can see, the start and end date needed to be moment objects for this method to work.