[DB-SIG] Dealing with bogus date in MySql

Andy Dustman farcepest at gmail.com
Fri May 6 15:43:43 CEST 2005

On 5/6/05, M.-A. Lemburg <mal at egenix.com> wrote:
> Andy Dustman wrote:

> > MySQLdb is using Python datetime objects, and apparently they are
> > rejecting the bad date.
> FWIW, the above repr() output indicates that it is using
> mxDateTime objects and, yes, mxDateTime raises an exception for
> bad dates or times.

You're right, of course, but the rest of the comments still apply,
except he should look at MySQLdb.mxdatetime instead.

> Wouldn't it be more appropriate to *correct* the wrong
> date/time value in the database ?!

Yes, but my guess is he has rejected the obvious solution for some
non-obvious reason.
Computer interfaces should never be made of meat.

More information about the DB-SIG mailing list