且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:无法将MySql.DateTime转换为System.DateTime

更新时间:2023-01-29 16:18:25

请将Convert Zero Datetime = True和Allow Zero Datetime = True添加到连接字符串。

Hi


In my application i have inserted ''Date'' into MySql database in MySql datetime(yyyyMMdd) format. Now in another application, i wants to select that date and some other fields and bind it to the datalist control. But it shows me the following error, "Unable to convert MySql.DateTime to System.DateTime". How can i convert MySql.DateTime to System.DateTime.

Please add Convert Zero Datetime=True and Allow Zero Datetime=True to your connection string.