Cause: java.sql.SQLException: Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp

这个错误的原因是:
Java的时间戳Timestamp类无法表示***0000-00-00 00:00:00***这个时间;

由于计算机的时间是从格林威治时间 1970年01月01日00时00分00秒开始计算的,所以该类中的有关方法也是以***1970-01-01 00:00:00***作为起始时间。

故数据库的字段中不能存储***1970-01-01 00:00:00***。

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

分析:loginTime的时间有误。

FAQ(64):java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

FAQ(64):java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

FAQ(60):java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

FAQ(60):java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

【Java异常】java.sql.SQLExcetion:Cannot convert value “0000-00-00 00:00:00” from column 9 to TIMESTAMP

本文目录一、背景描述二、错误原因三、解决方案方案1、修改配置文件的数据源url方案2、直接修改数据库一、背景描述Spring bo

Caused by: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Tim

1、错误描述### Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Tim...

Caused by: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date

1、错误描述### Cause: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date; SQL []...

Java:出现错误提示(java.sql.SQLException:Value '0000-00-00' can not be represented as java.sql.Date)

Java:出现错误提示(java.sql.SQLException:Value '0000-00-00' can not be represented as java.sql.Date) 原因分析: “0000-00-00 00:00:00”在mysql中是作为一个特殊值存在的,但 java.sql