Date Formats in queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a problem regarding date formats when I run a query. Basically I pass
two dates to a query in the format #dd/mm/yyyy# as a date range for my query.
The problem I am having is that if the date is, for example, 01/11/2004 (01
November 2004) it takes it as 11 January 2004 (mm/dd/yyyy) and if I pass in
30/10/2004 it reads it correctly as 30 October 2004. Is there a way around
this?

Example query:
SELECT DISTINCT (Client) FROM Trip WHERE Date1 >= #01/11/2004# AND Date2 <=
#11/11/2004#

Thanks in advance for your help.

Jen
 
Hi Jen,

You need to format your dates as mm/dd/yyyy before using them in the query,
it will work just fine after that.

Regards
 
Back
Top