My policy has always been to force a three letter month abbreviation, and four digit year
e.g.
strSQL = strSQL & " WHERE datefield=#" & Format(dateVariable,"dd/mm
That way there can be no ambiguity
Main Topics
Browse All TopicsMy computer has short date format dd/mm/yyyy in Regional settings. Suppose I write SQL query:
INSERT INTO Dates ( Date1 ) VALUES ('01/02/2007');
01/02/2007 means February 1, 2007.
What happens if this query runs on computer with other date format, like mm/dd/yyyy ? How does Access interpret date format in SQL query - does this depend on localization settings?
I generate SQL query programmatically and need to know whether I should use some hard-coded date format or culture-specific.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
the # symbol is the date delimiter used by Access. The dd/mmm/yyyy format should work in any situation because it cannot be misconstrued. Having said that I have only tested it in UK and US locales on ODBC connections from Access to SQL Server and Oracle databases. If you use ADO or Pass through the date delimiter will vary depending on the back-end database
Business Accounts
Answer for Membership
by: ryancysPosted on 2007-02-05 at 00:34:42ID: 18466417
>>How does Access interpret date format in SQL query - does this depend on localization settings?
I always use format of mm/dd/yyyy when dealing with database, it's a standard ISO format if not wrong. so instead of
INSERT INTO Dates ( Date1 ) VALUES ('01/02/2007');
you should always use
INSERT INTO Dates ( Date1 ) VALUES ('02/01/2007'); 'if is February 1, 2007
when you want grab the formatted value in table, you can always format it in sql or via script.