Return value based on dates

  • Thread starter Thread starter Tyler
  • Start date Start date
T

Tyler

In a field in a query I need to return a value, e.g.
WEEK1, WEEK2, etc., going back 4 weeks prior to the week
of current date that query is being run.

E.g. if the current date is Monday, Jan 26, 2004 and the
date in the query is between Dec 29 and Jan 4 the value
returned would be "WEEK1".

The query will not always be run on the same day of the
week. Any suggestions for the best way to handle this
situation?

Thanks!
 
To get the data for the last 4 weeks from today, try this in the Criteria
row of your query, under the date field:

Between DateAdd("d", -28, Date()) And Date()
 

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

Similar Threads


Back
Top