Roundtrip SQL data especially datetime

Leo Kislov Leo.Kislov at gmail.com
Sat Dec 16 01:32:31 EST 2006


John Nagle wrote:
>     Routinely converting MySQL DATETIME objects to Python "datetime"
> objects isn't really appropriate, because the MySQL objects have a
> year range from 1000 to 9999, while Python only has the UNIX range
> of 1970 to 2038.

You're mistaken. Python datetime module excepts years from 1 up to
9999:

>>> datetime.MINYEAR
1
>>> datetime.MAXYEAR
9999

  -- Leo




More information about the Python-list mailing list