mx.DateTime.Error: cannot convert value to a time value

Sorisio, Chris ChrisSorisio at PeakTechnical.com
Fri Apr 23 14:40:36 EDT 2004


Ladies and gentlemen,

I've imported some data from a MySQL database into a Python dictionary.  I'm
attempting to tidy up the date fields, but I'm receiving a
'mx.DateTime.Error: cannot convert value to a time value' error.  It's
related to glibc returning an error to a pre-1970 date, I think.

My question:  /how/ do I go through the Python direction I've created to
remove the pre-1970 date objects?  Ideally, I would be able to iterate
through the dict and remove any DateTime objects that cause int() to fail.
Unfortunately, the DateTime error causes my script to abort entirely.

Ex:

>>> report["COMPANY X"][1][2]
<DateTime object for '1969-12-31 00:00:00.00' at a1e1548>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040423/49c10f88/attachment.html>


More information about the Python-list mailing list