[Tutor] datetime.date objects from SQL query?
lists at janeden.org
Fri Sep 2 09:13:04 CEST 2005
Liam Clarke-Hutchinson wrote on 02.09.2005:
>Are you using pysqlite? If so, then let me quote from the pysqlite
>"pysqlite has default adapters for the date and datetime types in
>the datetime module. They will be sent as ISO dates/ISO timestamps
>Personally, I think pysqlite is a rocking DBAPI, and I applaud
>Gerhard Häring for such a useful project.
>(If you're not using pysqlite, it'll be a similar case of the DB's
>types being mapped to Python types.)
I actually use MySQLdb, and you're right: It seems to use the datetime module to handle values of date columns. I am still amazed about the nice features of MySQLdb and my unability to learn about them from pydoc MySQLdb.
Life's unfair - but root password helps!
More information about the Tutor