I have a field DateTimePicker in my database.
I want to add a search query to search the date.
When I use DateTimePicker1.text or .value it shows error.
How I can build a DateTimePicker query?? Please help me.
I'm using visual studio 2010.
Printable View
I have a field DateTimePicker in my database.
I want to add a search query to search the date.
When I use DateTimePicker1.text or .value it shows error.
How I can build a DateTimePicker query?? Please help me.
I'm using visual studio 2010.
well, w/o the code or the exact error message, we can't help much.
-tg
"Fail to convert parameter value from a String to DateTIme."
this error shown when I run the program and perform a search query.
The code is
Private Sub btnSearchMeetingDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearchMeetingDate.Click
Try
Me.ContactsTableAdapter.SearchMeetingDate(Me.Database1DataSet.Contacts, DateTimePicker1.Value & "%")
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub