I have a date field stored just fine in MySQL:
But when I try to connect to it using the Microsoft ODBC driver, I get the following error:
ERROR [HY000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.19-log]Incorrect date value: '3/22/2013 12:00:00 AM' for column 'newdate' at row 1
This seems to be an issue with the ODBC driver. I'm using MySQL ODBC 5.3 ANSI Driver
.
Anyone else encountered this error?
Update: Here is the c# code that generates this error:
DbCommand command = DbProviderFactories.GetFactory("System.Data.Odbc").CreateCommand();
command.CommandText = "CREATE TEMPORARY TABLE _newTable AS SELECT * FROM `"
+ tableName +"`";
command.Connection = TheDB.TheConn;
command.ExecuteNonQuery();