Hi,
I hope this list can help me.
I have a MySQL table with some dates, like this:
mysql> select MIN(change_date),MAX(change_date) from status_history;
+---------------------+---------------------+
| MIN(change_date) | MAX(change_date) |
+---------------------+---------------------+
| 2000-11-14 74:17:72 | 2005-05-05 17:17:43 |
+---------------------+---------------------+
1 row in set (0.34 sec)
Notice that first date is kind of funky; most days don't have 72 hours.
I'm trying to get the information out with MySQLdb:
self.conn=MySQLdb.connect(db=db,user=dbuser,host=dbhost,passwd=dbpass)
self.cur=self.conn.cursor()
self.cur.execute("select MIN(change_date),MAX(change_date) from status_history")
print self.cur.fetchone()
which gives:
(None, <DateTime object for '2005-05-05 17:17:43.00' at b7f90c98>)
Is there some way I can get the date with MySQLdb? "None" just isn't
helpful for my application.
Regards,
Mark
[EMAIL PROTECTED]
--
You think that it is a secret, but it never has been one.
- fortune cookie
_______________________________________________
DB-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/db-sig