SQLite 查询时异常:该字符串未被识别为有效的 DateTime 错误
原文地址:http://blog.csdn.net/gdjlc/article/details/8363297
查询的列createdate的数据类型为date,当它的值为空时,用查询语句select createdate from tb:
1)在SQLite数据库管理器SQLiteStudio能正常查询到。
2)在.net中,就会抛出异常:该字符串未被识别为有效的 DateTime 错误。
解决方法:把类型date改为varchar,sql的日期条件筛选where createdate > '日期'还可以继续用。

浙公网安备 33010602011771号