problem using between in a field date

  • Thread starter Thread starter WebRaster
  • Start date Start date
W

WebRaster

Working on a Access database a try to retrieve data selecting all the data
that match the following condition:

SELECT *
FROM Tabel1
WHERE daywork between MM1 and MM2

For example when MM1 is 24/10/2005 and MM2 is 30/10/2005 everything works
fine BUT

when MM1 is 24/10/2005 and MM2 is 03/11/2005 or MM2 is less than 11/11/2005
then system don't show any data

Bye
 
Access assumes mm/dd/yyyy format, regardless of what your regional settings
are. If the first 2 digits are greater than 12, Access will try to treat it
as dd/mm/yyyy format: otherwise, your dates aren't going to be interpretted
properly.

You might find it useful to read Allen Browne's "International Dates in
Access" at http://allenbrowne.com/ser-36.html
or what I have in my September 2003 Access Answers column for Pinnacle
Publication's "Smart Access" newsletter. (The column and accompanying
database can be downloaded at
http://www.accessmvp.com/djsteele/SmartAccess.html)

Of course, that's just for Access, and you've posted to the .ADP.SQLServer
newsgroup, where the answer is a little different...
 
Thank you. Your message help much



Douglas J. Steele said:
Access assumes mm/dd/yyyy format, regardless of what your regional
settings are. If the first 2 digits are greater than 12, Access will try
to treat it as dd/mm/yyyy format: otherwise, your dates aren't going to be
interpretted properly.

You might find it useful to read Allen Browne's "International Dates in
Access" at http://allenbrowne.com/ser-36.html
or what I have in my September 2003 Access Answers column for Pinnacle
Publication's "Smart Access" newsletter. (The column and accompanying
database can be downloaded at
http://www.accessmvp.com/djsteele/SmartAccess.html)

Of course, that's just for Access, and you've posted to the .ADP.SQLServer
newsgroup, where the answer is a little different...
 
Back
Top