I am trying run a report based on a Wednesday to Wednesday reporting week. I have found lots of examples that say the get correct date, such as:
DATEADD(DAY, -5, DATEADD(WEEK, DATEDIFF(WEEK, 0, getdate()), 0))
The problem is that these seem to only work for the current week. The example above gives 15/11/17 which is correct for today (24/11/2017) but incorrect on Sunday (26/11/2017) when it would get the 22/11/2017.
if I look at the report between 22-28/11/2017(Wed-Tue) I should see a report from 15-22/11/2017
Between the 29/11 & 5/12/2017 the report should be from 22-29/11/2017
any help is appreciated!