Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query with specific date range

Status
Not open for further replies.

ickman

Instructor
May 3, 2001
1
CA
I am trying to create a query that will pull information for a specific date and will include info for the next thirty days after that date.

Basically what I need is information=infoDate + 30 days


I hope I am making myself clear any help would be appreciated.
 
use where DateDiff(d,onedate,otherdate)<30 John Fill
1c.bmp


ivfmd@mail.md
 
In MS Access the query could be formatted this way.

Where MyDate Between InfoDate And Dateadd(&quot;dd&quot;, 30, InfoDate)

If you use the query designer you would put the following in the criteria.

Between InfoDate And Dateadd(&quot;dd&quot;, 30, InfoDate)

Between is inclusive so the query would select record with MyDate=InfoDate, MyDate=InfoDate+30 and all dates between. Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top