Question: how to find time difference in node js?
Answer: function calculateDays(startDate,endDate) { var start_date = moment(startDate, 'YYYY-MM-DD HH:mm:ss'); var end_date = moment(endDate, 'YYYY-MM-DD HH:mm:ss'); var duration = moment. duration(end_date. ...  var days = duration. ...  return days; }