Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900