Retrieve data with date parameters

S

Sarah

I am trying to select data in a query that fall between two dates. Can anyone
pls help me with a formula.

Many thanks in advance!
 
A

Andi Mayer

I am trying to select data in a query that fall between two dates. Can anyone
pls help me with a formula.

Many thanks in advance!

SELECT * FROM MYTable WHERE MyDateFIELD BETWEEN
#StartDate# AND #endDate#

Start and EndDate have to be mm/dd/yyyy format
 
J

Jeff Boyce

Sarah

Open a query in design mode. Add the field that holds the date.

As a criterion under that (date-related) field, use something like:

Between #1/1/2004# And #1/31/2004#

The "#" signs are NOT optional if you are using actual dates (but Access
will insert them if you only type the dates).

Check the wide variety of date-related functions to try other values.

Use parameters if you want the user to enter dates.
 
Top