Between ... and ...

  • Thread starter Thread starter stelios
  • Start date Start date
S

stelios

Hi,

I have a query in a DAO recordset which have the parameter <<Between
[indate] and [outdate]>>. The dates have the British format "dd/mm/yyyy" (my
fields are saved in the tables at this format).
When I run the query by code I have wrong results! If I transfer the SQL
syntax, with copy-paste, in the access's "design view" I see that the date
changes in USA's format.
Is there a way to avoid it?
(This moment I use the function <<format(indate,"mm/dd/yyyy")>> and the
access recognize the date as British (it changes the "mm"->"dd" and vise
versa) so I get the right records .... I think!!!! ...... Is this way
right?)

Thanks
 
See:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

The article explains that you must use the mm/dd/yyyy format and delimit
with # for literal values in a SQL clause, regardless of your regional
settings, and explains how to avoid the 3 cases where Access is likely to
misunderstand your dd/mm/yyyy date entries.
 
Back
Top