开发问题:error: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
2018-03-14 17:34
411 查看
代码中查询MySQL的结果集时报错,提示Value ‘0000-00-00 00:00:00’ can not be represented as
java.sql.Timestamp;刚开始以为是代码中格式化结果集中的日期报错,找了一遍发现并没有对日期
进行格式化,发现是查询的结果集中某数据行的日期值为0000-00-00 00:00:00。因MySQL的时间类型
datetime范围是1000-01-01 00:00:00 到 9999-12-31 23:59:59,所以报错。
java.sql.Timestamp;刚开始以为是代码中格式化结果集中的日期报错,找了一遍发现并没有对日期
进行格式化,发现是查询的结果集中某数据行的日期值为0000-00-00 00:00:00。因MySQL的时间类型
datetime范围是1000-01-01 00:00:00 到 9999-12-31 23:59:59,所以报错。
相关文章推荐
- 关于SQLException:Value'0000-00-00 00:00:00'can not be represented as java.sql.Timestamp的问题
- ERROR: 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
- 插入Mysql异常之Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp
- MySQL关于Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- MySQL关于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
- 错误: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
- MySQL异常: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- hiERROR: Value '0000-00-00' can not be represented as java.sql.Timestamp
- '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp error
- 异常java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- MySQL关于Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- 提示Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp;
- Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- 错误:Value \'0000-00-00 00:00:00\' can not be represented as java.sql.Timestamp;的解决