Mysql命令把excel导入数据库,空日期怎么办?load data local infile 'D:\11.txt' into
load data local infile 'D:\11.txt' into table test_excel fields terminated by '\t';
我试了一下,导入进去后,原来为空的日期在数据库里面显示0000-00-00,则aspnet客户端gridview绑定不了。出现错误Unable to convert MySQL date/time value to System.DateTime
我试了一下,导入进去后,原来为空的日期在数据库里面显示0000-00-00,则aspnet客户端gridview绑定不了。出现错误Unable to convert MySQL date/time value to System.DateTime
作者: chen_zhen87 发布时间: 2011-05-30
是不是日期的格式不对!
作者: moocky 发布时间: 2011-05-30
先用strtotime函数对原来的日期做转换,如果转换失败
则用strtotime("now")把现在的日期写入进去
则用strtotime("now")把现在的日期写入进去
作者: sibang 发布时间: 2011-05-30