Date Between Query

  • Thread starter Thread starter Tic3
  • Start date Start date
T

Tic3

How can I write a query that will retrieve all records from my database
with a date between the 19th of the current month and the 20th of the
previous month?

Thanks for any help!

Tic3
 
Assuming you're building the query using the query builder GUI, in the
Criteria cell under your date field, type the following:

BETWEEN DateSerial(Year(Date), Month(Date) - 1, 20) AND
DateSerial(Year(Date), Month(Date), 19)

(Don't worry: the DateSerial function will handle it correctly in January,
when Month - 1 = 0)
 
Back
Top