title: Javascript: Calculating time duration on ajax response
body: <p>I am trying to calculate the time duration of a tasks, that I get from an ajax response.</p>
  <p>Following are my table values:</p>
  <pre><code> Jobid   techid, techtype,    notes,                            starttime,             stoptime
      1      1     Brakes       Break disc needed to be changed   2020-07-16 13:00:00   2020-07-16 13:40:00
      1      2     Oil Change   Replaced oil                      2020-07-17 08:00:00   2020-07-17 09:00:00
      1      3     Cleaning     Cleaned the vehicle               2020-07-17 10:00:00   2020-07-17 10:30:00
  </code></pre>
  <p>On my ajax response, in the above case, I am getting 3 objects each having the start time, and stop time. I want to calculate total time spent in hours and minutes.</p>
  <p>Is there an easy way to calculate the total duration?</p>