[Tutor] datetime.date objects from SQL query?

Jan Eden lists at janeden.org
Fri Sep 2 09:13:04 CEST 2005


Hi Liam,

Liam Clarke-Hutchinson wrote on 02.09.2005:

>Hi Jan,
>
>Are you using pysqlite? If so, then let me quote from the pysqlite
>docs -
>
>"pysqlite has default adapters for the date and datetime types in
>the datetime module. They will be sent as ISO dates/ISO timestamps
>to SQLite."
>
>
>Personally, I think pysqlite is a rocking DBAPI, and I applaud
>Gerhard Häring for such a useful project.
>
>Regards,
>
>Liam Clarke
>
>(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.

Thanks,

Jan
-- 
Life's unfair - but root password helps!


More information about the Tutor mailing list