Date query - show all records for this week

Flint

Registered User.
Local time
Today, 05:22
Joined
Mar 19, 2004
Messages
10
What criteria do you need to enter to make a query that shows all records for 'this week'?

I have a field called 'JobDate' and want to make a query which shows all the dates this week

E.g. If you run the query today (Wed 24th March) the query will show all the records with dates between 22nd March to 28th March (Monday-Sunday this week)
 
Thanks for that link I have now solved my problem
 
Flint said:
What criteria do you need to enter to make a query that shows all records for 'this week'?

I have a field called 'JobDate' and want to make a query which shows all the dates this week

E.g. If you run the query today (Wed 24th March) the query will show all the records with dates between 22nd March to 28th March (Monday-Sunday this week)

Howdy Flint!

Sounds like you're looking for =DatePart("ww",Date()).

The "ww" gives you an interger representing which week of the year it is. As for the Monday through Sunday part, I haven't figured that. By looks of DatePart via Access Help or msdn, you should be able to use a third variable to determine the start day of your week. BUT I've tried all sorts of values and they all return the same value. :confused: You could always add an extra day to the second value. :p
 

Users who are viewing this thread

Back
Top Bottom