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:
server=localhost;User Id=root;password=mautauaja;Persist Security Info=True;database=test;Convert Zero Datetime=True