title: Python: How do I get time from a datetime.timedelta object?
body: <p>A mysql database table has a column whose datatype is time ( <a href="http://dev.mysql.com/doc/refman/5.0/en/time.html" rel="noreferrer">http://dev.mysql.com/doc/refman/5.0/en/time.html</a> ). When the table data is accessed, Python returns the value of this column as a datetime.timedelta object. How do I extract the time out of this? (I didn't really understand what timedelta is for from the python manuals).</p>
  
  <p>E.g. The column in the table contains the value "18:00:00"
  Python-MySQLdb returns this as datetime.timedelta(0, 64800)</p>
  
  <hr>
  
  <p>Please ignore what is below (it does return different value) - </p>
  
  <p><em>Added: Irrespective of the time value in the table, python-MySQLdb seems to only return datetime.timedelta(0, 64800).</em></p>
  
  <p>Note: I use Python 2.4</p>