Make sure your method arguments are in the right format
When converting a string to DateTime, parse the string to take the date before putting each variable into the dateTime object'
Jorge Paulino
Can you show how you have done ? The last code I have showed you should work fine!
diveDate is a datetime field right ?
davecocks
ASKER
Hi,
Sorry you are right. I had been converting to dd/mm/yyyy rather than what you recommended mm/dd/yyyy
However, Its still doesn't filter the dates in diveDate.
I've tried some dummy data and records with:
26/02/2009 00:00:00 get returned in the gridView fine but.....
it doesn't return any records with real dates i.e. 26/02/2009 16:45:34
Any other ideas?
Private Sub datePickerSurveyList_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles datePickerSurveyList.ValueChanged'Sets up filter for the selected dates Me.DiveDetailsListingBindingSource.Filter = "diveDate = #" & _ datePickerSurveyList.Value.Date.ToString("MM/dd/yyyy") & "#" End Sub
Open in new window