Wednesday, December 13, 2006

Value '0000-00-00' can not be represented as java.sql.Timestamp

This is a MySQL specific error.

As said on lo-fi, this is a problem that happens when there's a row in the table with all zero date.

Answer:
zeroDateTimeBehavior=convertToNull tag at the end of the connection string, e.g.

jdbc:mysql://myhost/mydatabase?zeroDateTimeBehavior=convertToNull

1 Comments:

At 9:04 AM, Blogger prabhakaran said...

Thanks, I have been struggling to solve the issue. Good One

 

Post a Comment

<< Home