title: convert date to number python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6706231/fetching-datetime-from-float-and-vice-versa-in-python">Fetching datetime from float and vice versa in python</a>  </p>
  </blockquote>
  
  
  
  <p>Like many people I switched from <code>Matlab</code> to <code>Python</code>.  <code>Matlab</code> represents each date as a number.  (<code>Integers</code> being days since <code>00-00-0000</code>, and fractions being time in the day).  I believe that <code>python</code> does the same except off a different start date <code>0-0-0001</code></p>
  
  <p>I have been playing around with <code>datetime</code>, but cant seem to get away from <code>datetime</code> objects and <code>timedeltas</code>.  I am sure this is dead simple, but how do I work with plain old numbers (floats)?</p>
  
  <p>perhaps as a bit of context:</p>
  
  <p>i bring in a date and time stamp and concatenate them to make one time value:</p>
  
  <pre><code>from datetime import datetime
  date_object1 = datetime.strptime(date[1][0] + ' ' + date[1][1], '%Y-%m-%d %H:%M:%S')
  date_object2 = datetime.strptime(date[2][0] + ' ' + date[2][1], '%Y-%m-%d %H:%M:%S')
  </code></pre>