webwired72
Programmer
Hi, I am using C# and SQL Express 2005...
I have a table that has a datetime column, on the form I have placed a DateTimePicker and I would like to search by date, using that object, but am running into some snares... Here's my code...
I am getting this error...
I have a table that has a datetime column, on the form I have placed a DateTimePicker and I would like to search by date, using that object, but am running into some snares... Here's my code...
Code:
private void fillByDateToolStripButton_Click(object sender, EventArgs e)
{
try
{
this.ticketsTableAdapter.FillByDate(this.massageProDataSet.Tickets, ((System.DateTime)(System.Convert.ChangeType(ticketSearchDateTimePicker, typeof(System.DateTime)))));
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
I am getting this error...
Object must implement IConvertible.