Im not sure what I need to put in the criteria to make this work. There is just one date field and I need only the records that the date in that field is over 30 days old. thanks for any help.
Hi Blitz,
Assuming you're working from the query's design view (and not directly with the SQL), place the following in the criteria row: < DateAdd("d",-30,Date())
And that's it. "Date()" refers to the current date, and the DateAdd function subtracts 30 days ("d",-30) from that date.
hmmm Im probably doing something wrong but Ive tried all 3 of what you guys have posted and none worked. Its still showing all the records. I am puting it in the criteria row in the query design view but its not working. Got any ideas what may be wrong?
nope that didnt work either. Could it have anything to do with the date format? The format is MM/DD/YY in cast that matters. I can put a specific date in the criteria and it only shows the records for that date so the query is working, just not with the criteria I want
Thanks again for any help
Ref thread 181-58573 Group Dates by 30, 60, and 90 day Intervals Posted in early March. It covers much the same subject as you requested only in more detail.
Steve King
Professional growth follows a healthy professional curiosity
Thanks for the help guys. The problem was I had the field setup as a text field with just an imput mask of a date format instead of having it setup as a date field. I have one other question. When the field is set as a date field it doesnt allow you to have any 0's in the month or day (ex 09/05/01 is always displayed as 9/5/01) is there any way for it to keep the 0's?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.