The between clause

fredElliotRules

Registered User.
Local time
Today, 19:19
Joined
Nov 3, 2006
Messages
15
Hi,

I have a query using the between clause with dates #01/01/2006# and #01/01/2007#. I have been reading a little on the between clause and it differs from SQL program to SQL program. What are its characteristics in MS Access is it >=#01/01/2006# AND <=#01/01/2007# or >=#01/01/2006# AND <#01/01/2007#.


Thank you.
 
The Between clause

Code:
Between #01/01/06# and #01/01/07#

will pull every record including the start and end dates

Col
 
So, if you wanted to pull down all records from 2006 (and not the first day of 2007)....?
 
Then you should use :
Between #1/1/2006# And #12/31/2006#

Works for me.
 
And one needs to be aware that if the underlying data contains times then as the default is 00:00:00 you will not get any data for the end date unless one adds a day or more accurately 23:59:59

Brian
 

Users who are viewing this thread

Back
Top Bottom