Scope to the week of a given date

from the Artful Common Queries page


To scope a query to the calendar week (Sunday through Saturday) of a date value @d, write ...
... WHERE d BETWEEN AddDate(@d,-DayOfWeek(@d)+1) and AddDate(@d,7-DayOfWeek(@d)) ...

Last updated 29 Dec 2024