I am new to nodejs, and I am trying to get the difference between 2 times, but I get a different value. here is my code :
var now = moment(Suivi.FI);
var then = moment(Suivi.DI);
var TA = moment(moment.duration(then.diff(now))).format("hh:mm");
as a result i get:
sql": "Insert into suivi(date, equipement, project, shift, description, Action, user, DA, DI, FI,TA) values('','','','','','','','','','','12:00')"
I tried to test with a simple date but I got the same value. what am I missing? what should I do.?