Exception Unhandled MySql.Data.Types.MySqlConversionException: 'Unable to convert MySQL date/time value to System.DateTime'
CLSOpen.OPEN("select * from bulksmstable where groupname='" + ComboSheet.Text + "'"); while (CLSOpen.reader.Read()) { ListViewItem li = new ListViewItem(CLSOpen.reader["mobilenumber"].ToString()); li.SubItems.Add(DateTime.Parse(CLSOpen.reader["datecreated"].ToString()).ToString("MM/dd/yyyy")); li.SubItems.Add(DateTime.Parse(CLSOpen.reader["datesend"].ToString()).ToString("MM-dd-yyyy")); ListView1.Items.AddRange(new ListViewItem[] { li }); } CLSOpen.CLOSE();
Quote:Exception Unhandled MySql.Data.Types.MySqlConversionException: 'Unable to convert MySQL date/time value to System.DateTime'
Quote: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.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)