Date Query for more than "x" days

  • Thread starter Thread starter Chad Thompson
  • Start date Start date
C

Chad Thompson

How would I build a query that would return only records
in a table where, for example, more than three days have
passed since they were entered? Weekends and holidays do
not matter, just the absolute difference in days.
Is it possible to make such a query rolling, so that it
will always look x days into the past from a moving
calendar date?

Thanks Very Much,

Chad Thompson
 
Will the number of days (x) change each time you run the
query?

Is the calendar date going to be the current date, or will
it depend on some other criteria? If not the current
date, then what is the criteria for the date?

Without knowing exactly what you're asking, here is one
way to do it:


Create a calculated field:
DaysPassed: Date()-[date] (where Date() is a function
that returns the current day, and [date] is the date field
you're checking against. Replace [date] with whatever
your field is named.)
In the criteria box for this calculated field, enter
either >3 (if you'll always be checking for 3 days)
or enter >[Enter number of days passed] (if you want to
prompt the user to enter the number of days.)

Hope this helps!
 

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

Back
Top