I am new to nodeJs and using moment.js in my projects. I would like to calculate datetime difference resulting into hours minutes and seconds. I googled but did not got related solution.
Here is the code and my effort on google.
var moment = require('moment');
var now = "26/02/2014 10:31:30";
var then = "25/02/2014 10:20:30";
var config = "DD/MM/YYYY HH:mm:ss";
var duration = moment.utc(moment(now, config).diff(moment(then,config))).format("HH:mm:ss");
console.log(duration);
This prints 00:11:00
expected result is 23:11:00
any help would be appreciated and thanks in advance.