J
John
Hi
I have a form with tow fields for dates in dd/mm/yyyy format. I am trying to
use the fields in a query's where clause as below;
"SELECT * " & _
"FROM Orders " & _
" WHERE Orders.[Delivery Date])>= #" & Format([Forms]![Batch
Invoices]![FromDate], "dd/mm/yyyy") & "# And Orders.[Delivery Date]<= #" &
Format([Forms]![Batch Invoices]![ToDate], "dd/mm/yyyy") & "# "
My problem is that query doe snot read the dates correctly and rather takes
them as in mm/dd/yyyy format i.e. if 01/07/2006 (dd/mm/yyyy) was entered,
query brings records for 07/01/2006 (mm/dd/yyyy).
What is the ideal way to deal with the dates in this case so the dates are
taken as dd/mm/yyyy by the query?
Thanks
Regards
I have a form with tow fields for dates in dd/mm/yyyy format. I am trying to
use the fields in a query's where clause as below;
"SELECT * " & _
"FROM Orders " & _
" WHERE Orders.[Delivery Date])>= #" & Format([Forms]![Batch
Invoices]![FromDate], "dd/mm/yyyy") & "# And Orders.[Delivery Date]<= #" &
Format([Forms]![Batch Invoices]![ToDate], "dd/mm/yyyy") & "# "
My problem is that query doe snot read the dates correctly and rather takes
them as in mm/dd/yyyy format i.e. if 01/07/2006 (dd/mm/yyyy) was entered,
query brings records for 07/01/2006 (mm/dd/yyyy).
What is the ideal way to deal with the dates in this case so the dates are
taken as dd/mm/yyyy by the query?
Thanks
Regards