I have two dates in millis 1513885098821 & 1513885078742.
How to display the difference between above two dates in hrs and mins like 2 hrs 31 mins
.
If moment have any option then its good, solution using plain javascript is also ok for me.
I tried below
moment(new Date(txn.toDate - txn.fromDate)).format('HH mm')
But it gives 05 30 result.
Output of below line is
new Date(1513885098821 - 1513885078742);
result: Thu Jan 01 1970 05:30:20 GMT+0530 (India Standard Time)