title: Converting a datetime object to an integer python
body: <p>I would like to convert a datetime object to an int in python:</p>
  
  <pre><code>import datetime
  
  time_entered = datetime.datetime.strptime(raw_input("Time1: "), "%H%M")
  time_left = datetime.datetime.strptime(raw_input("Time2"), "%H%M")
  
  time_taken = time_left - time_entered
  
  int(time_taken)
  </code></pre>
  
  <p>When I run that code I get the following error: </p>
  
  <blockquote>
    <p>TypeError: int() argument must be a string or a number, not
    'datetime.timedelta'</p>
  </blockquote>