title: How to get the time difference in minutes in python for time expressed in this format?
body: <p>I am using Python 2.7. I want to find the time difference in minutes with the variables below;</p>
  
  <pre><code>import datetime  
  #Time Format (YYYY-MM-DD HH-MM-SS)
  TimeStart = '2014-06-30 13:23:46'
  TimeEnd = datetime.datetime.now()
  </code></pre>
  
  <p>I want to write a function that returns the time difference in minutes using a floating data type. If the time difference is 90secs, then the function returns 1.5. This is the function I wrote but unfortunately, it is far from working. </p>
  
  <pre><code>def getTimeDifferenceFromNow(TimeStart, TimeEnd):
      timeDiff = TimeEnd - TimeStart
      return divmod(timeDiff.days * 86400 + timeDiff.seconds, 60)  
  </code></pre>
  
  <p>How can this be done in Python 2.7? Forget about the function I wrote if it is too far from the right answer.</p>