MySql TIMESTAMP '0' value breaks on select

JeffKirby
2006-11-16
2013-04-29
  • JeffKirby

    JeffKirby - 2006-11-16

    I have a table with timestamps that contain default values ( the timestamp is only added once an event inserts one).
    So I select all or 1 row, but i get

    Cannot Convert Value '0000-00-00 00:00:00' from column 10 to TIMESTAMP

    This is the correct 0 value for the datatype.. so its just a view issue with SQLExplorer.
    reference here
    http://www.mysql.org/doc/refman/5.1/en/date-and-time-types.html

     
    • Stzzo

      Stzzo - 2008-01-15

      Adding "?zeroDateTimeBehavior=convertToNull? to the URL works at least for SELECT statements.

      Example:

      jdbc:mysql://mysql.yourdomain.com/username?zeroDateTimeBehavior=convertToNull

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks