1. 程式人生 > >java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

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

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

原因是查詢出的結果集中有一行的資料為'0000-00-00 00:00:00',而mysql資料庫中的timestamp的範圍是:’1970-01-01 00:00:00’到2037年。

所以刪除超出的日期即