Unable to convert MySQL date/time value to System.DateTime Unable to convert MySQL date/time value to System.DateTime asp.net asp.net

Unable to convert MySQL date/time value to System.DateTime


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


If I google for "Unable to convert MySQL date/time value to System.DateTime" I see numerous references to a problem accessing MySQL from Visual Studio. Is that your context?

One solution suggested is:

This is not a bug but expected behavior. Please check manual under connect options and set "Allow Zero Datetime" to true, as on attached pictures, and the error will go away.

Reference: http://bugs.mysql.com/bug.php?id=26054


i added both Convert Zero Datetime=True & Allow Zero Datetime=True and it works fine