Re: handling of "0" dates....

From: Neil Pierson (neil.pierso..mail.com)
Date: Wed Aug 08 2007 - 15:59:10 EDT

  • Next message: Joe Baldwin: "ORM Comparison"

    Starting from MySQL 5.0.2, MySQL gives warnings or errors if you try
    to insert an illegal date. You can get MySQL to accept certain dates,
    such as '1999-11-31', by using the ALLOW_INVALID_DATES SQL mode.
    (Before 5.0.2, this mode was the default behavior for MySQL.). If you
    do not want to allow zero in dates, you can use the
    NO_ZERO_IN_DATE SQL mode. (With strict mode disabled, invalid dates
    such as '2004-04-31' are converted to '0000-00-00' and a warning is
    generated. With strict mode enabled, invalid dates generate an error.)

    On 8/4/07, Michael Gentry <blacknex..mail.com> wrote:
    > Which is why I call setLenient(false) on the DateFormat instances I use. :-)
    >
    > /dev/mrg
    >
    > On 8/4/07, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > > FWIW, Java calendar classes will do that too.
    > >
    > > Andrus
    > >
    > > On Aug 4, 2007, at 8:42 PM, Michael Gentry wrote:
    > >
    > > > What are you going to do February 31, 2007 is in the data? Sadly,
    > > > this is possible. Actually, it has been a while since I played with
    > > > MySQL and it may silently convert that to be March 3, 2007.
    > > >
    > > > /dev/mrg
    > > >
    > >
    > >
    >



    This archive was generated by hypermail 2.0.0 : Wed Aug 08 2007 - 15:59:41 EDT