错误:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp;的解决
来源:互联网 发布:sql error: 1054 编辑:程序博客网 时间:2024/06/13 10:41
问题:
代码中查询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,所以报错。
解决方法:
将日期改为正常日期即可。
阅读全文
0 0
- 错误: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' can not be represented as java.sql.Timestamp错误
- MySQL 关于 Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp 的错误
- Err:java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp
- [DEBUG] “java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp”
- java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp
- “java.sql.SQLException: Value '0000-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 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
- ERROR: 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
- Value '0000-00-00' can not be represented as java.sql.Timestamp
- mysql Value '0000-00-00' can not be represented as java.sql.Timestamp
- Deep Learning 学习笔记整理系列之三
- Ubuntu上如何安装SGE(Sun Grid Engine)
- verilog脉冲产生高电平
- java集合框架(1、集合介绍)
- nhmicro添加信审功能
- 错误:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp;的解决
- training1管理activity生命周期
- Javascript实现别踩白块儿(钢琴块儿)小游戏
- 百度地图显示不出,蓝屏
- QT出现错误 解决方案
- android指南-1应用组件-基本原理
- 排序(1)简单排序
- 简单的表达式、公式解析器
- Vue折腾记