Quote Originally Posted by brjames32 View Post
If I do a debug.print (DateTime1.text), the date is in UK format i.e 11/05/2009 but when these variables are used in a Select statement, the dates returned seem to be in US format e.g. selecting dates between 01/04/2009 and 7/05/2009 selects dates between 04/01/2009 and 05/07/2009 when the results are displayed in the DataGridView!

Getting DateTime variables:
Code:
SDate = sDateTime.Text
FDate = fDateTime.Text

Select Statement:
Code:
Dim da As New OleDb.OleDbDataAdapter("Select * From Sanctions Where [Group] Like '%EN%' AND [Date] BETWEEN #" & SDate & "# AND #" & FDate & "# AND [Description] <> 'Merits' ", cnDept)
I think its problem with query not with datetimepicker, you can try as below.

Code:
Dim da As New OleDb.OleDbDataAdapter("Set dateformat DMY Select * From Sanctions Where [Group] Like '%EN%' AND [Date] BETWEEN #" & SDate & "# AND #" & FDate & "# AND [Description] <> 'Merits' ", cnDept)