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!

Determine date field that is 90 to 180 days ago

Status
Not open for further replies.

souladventurer

Programmer
Jun 13, 2003
4
US
Hello,

I have a date field. I need to generate a query that only picks up dates that are between 90-180 days old.

I tried the following in the criteria but it did not work:

(date()-[tablename.date field]) between 90-180

Thanks in advance for any help!

 
Update this SQL with the appropriate table name and [DateField] name and this should select the correct records for you:

Select A.*
FROM tblYourTableName as A
WHERE A.[DateField] Between DateAdd("d",Date(),-180) and DateAdd("d", Date(),-90);

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top