title: Subtract Two DateTime objects - Python
body: <p>I have two date time objects like this</p>
  
  <pre><code>a = first date time object
  b = second date time object
  </code></pre>
  
  <p>And then </p>
  
  <pre><code>c = a - b
  </code></pre>
  
  <p>Now I want to compare c and check if the difference was greater than 3 hours, so I have a time object called <code>three_hours</code></p>
  
  <pre><code>three_hours = datetime.time(3,0)
  if c &gt;= three_hours:
       #do stuff
  </code></pre>
  
  <p>but I get an error saying cannot compare datetime.teimdelta to datetime.time</p>
  
  <p>My question is different as I also want to then compare the subtracted time, not just get the difference!!</p>
  
  <p>How can I convert them to the correct formats so I can check if 3 hours has passed?</p>
  
  <p>Thanks for the help</p>