Calculate "week-ending" date

M

Mona-ABE

In an Access query, I'd like to have an expression that takes the current day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
 
J

Jeff Boyce

One way to approach this would be to get the day number (Sunday = 1, Monday
= 2, ...) of the current date (Date()), subtract that from 7 (days in a
week), then add that many days to the current date (using DateAdd()
function).

Or have I misunderstood?
 
M

Mona-ABE

Thanks so much for the tip...it worked great!!!
--
Thanks!
Mona-ABE


John Ortt said:
Try something allong the lines of:

DateAdd("d",(7-Weekday([DATE])),[DATE])
 
M

Mona-ABE

Thanks so much for the tip...it worked great!!!
--
Thanks!
Mona-ABE


Jeff Boyce said:
One way to approach this would be to get the day number (Sunday = 1, Monday
= 2, ...) of the current date (Date()), subtract that from 7 (days in a
week), then add that many days to the current date (using DateAdd()
function).

Or have I misunderstood?
 
Top