title: Calculate the difference between 2 SQLite datetimes in Javascript
body: <p>I'm have a startDate and a endDate stored in a SQLite database and need to calculate the difference in minutes and seconds between the 2 datetimes using javascript.</p>
  
  <p>For example: </p>
  
  <pre><code>startDate = 2012-10-07 11:01:13
  endDate = 2012-10-07 12:42:13
  </code></pre>
  
  <p>I've had a good read though loads of similar questions on SO but could only find things relating to calculating this as part of a select.</p>