Selecting Date Range in Queries

R

Richard Albrecht

Hi,

I'm using a Date field called: StartDt

I'm trying to do a query that would only return records
where (StartDt = current month ) or
(StartDt = Current Month + 1 month) or
(StartDt = Current Month + 2 month)

Like if Current Month is Nov 2003 the returned records would have a start
date in
Nov 2003, Dec 2003 and Jan 2004.

What's the best way to accomplish this?

TIA
 
A

Allen Browne

WHERE StartDt Between (Date - Day(Date) + 1) And
(DateAdd("m", 3, Date - Day(Date) + 1) -1)
 
M

Michel Walsh

Hi,



... WHERE DateDiff( "m", Now, DateTimeField ) BETWEEN 0 and 3


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top