title: python - get current time of day in minutes
body: <p>I want to get the current time of day in minutes. I found this code online:</p>
  <pre><code>import datetime
  start = datetime.datetime(2009, 1, 31)
  end = datetime.datetime(2009, 2, 1)
  diff = end-start
  print (diff.days * 1440) + (diff.seconds / 60)
  &gt;&gt; 1440.0
  </code></pre>
  <p>I'm not sure how i can do this using the <code>datetime.now()</code> function, and get the current time of day.</p>
  <p>I can compare times if i set the datetime.now() to a variable, and later set it to another variable, and compare them.</p>