I'm converting an ASP.Net app over from using MS SQL Server to MySQL. I
used the following line to detect a null date field:
if not IsDBNull(RS("CampStartDate")) then
CampStartDate.Text =
FormatDateTime(Convert.ToDateTime(RS("CampStartDate")),DateFormat.ShortDate)
However, when I execute this line with MySQL database, I get the error,
"Unable to convert MySQL date/time value to System.DateTime". I found on
the net that if I include "Allow Zero Datetime=true" in my connection string
it will take care of it, and it appears to have done so. However, when it
attempts to execute the next line, I get the same exact error. I have tried
converting this field from DateTime to just Date, because I do not need a
time element, and that hasn't made any difference.
Anyone know how to overcome this?
Thanks,
Jesse