I get this error:
Unable to convert MySQL date/time value to System.DateTime
while I am trying to fetch the data from a MySQL database. I have the date datatype in my MySQL database. But while retrieving it into my datatable, it get the error above.
How can I fix this?
You must add Convert Zero Datetime=True to your connection string, for example:
Convert Zero Datetime=True
server=localhost;User Id=root;password=mautauaja;Persist Security Info=True;database=test;Convert Zero Datetime=True
1.4m articles
1.4m replys
5 comments
57.0k users