fix DateTime bug

This commit is contained in:
Looly 2020-03-12 17:21:11 +08:00
parent a9d8cae6b1
commit f540888a4c

View File

@ -268,7 +268,13 @@ public class HandleHelper {
Object rawValue;
switch (type) {
case Types.TIMESTAMP:
rawValue = rs.getTimestamp(columnIndex);
try{
rawValue = rs.getTimestamp(columnIndex);
} catch (SQLException ignore){
// issue#776@Github
// 当数据库中日期为0000-00-00 00:00:00报错按照普通日期获取
rawValue = rs.getDate(columnIndex);
}
break;
case Types.TIME:
rawValue = rs.getTime(columnIndex);