Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date format in Access 2002

Status
Not open for further replies.

hpaille

Programmer
Apr 16, 2003
37
FR
I use the following query that returns all my subscribtions with an end date greater than the 1st of June:
SELECT Abonnements01.*
FROM Abonnements01
WHERE (DATE_FIN>#06/01/2004#');

However, if I do the same for the 28th of Feb, the following query also works:
SELECT Abonnements01.*
FROM Abonnements01
WHERE (DATE_FIN>#28/02/2004#');
--> the format is different. How is it chosen (fairly obvious for the 2nd example, but for 01/06 or 06/01 ???)

I tried with "format(28/02/2004, 'mm/dd/yyyy')", and it worked !

How can I be sure that Access is using the format I want ?
 
It's a trial'n'error scheme with m/dd/yyyy preference when ambiguity.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
By using an obvious format knowing that m/d/yyyy is preferred when ambiguity.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top