Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how 2 subtract 2 dates using moment.js

var date1 = moment('2016-10-08 10:29:23');
var date2 = moment('2016-10-08 11:06:55');
var diff = date2.diff(date1);
 
PREVIOUS NEXT
Tagged: #subtract #dates
ADD COMMENT
Topic
Name
9+9 =