[Tutor] DateTime and MySQLdb

Michael Montagne Michael Montagne <montagne@boora.com>
Fri May 16 18:31:31 2003


How do I insert a DateTime object into a datetime column in a mysql
table using mysqldb.
I have this to start but I know it won't work.  odt is a DateTime object.


cursor.execute("INSERT INTO readings (readingdate,systolic,diastolic,pulse,comments) VALUES (odt,%d,%d,%d,%s)",(systolic,diastolic,pulse,comments))


-- 
  Michael Montagne  http://www.themontagnes.com  503.226.1575 
--