finding the start day (Monday) of the current week
The most simple implementation
SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) MondayOfCurrentWeek
Building on top of p.campbell's solution, if you don't want to use or can't use "SET DATEFIRST 1", you can get around that by doing the following:
SELECT DATEADD(DD, 2 - DATEPART(DW, DATEADD(DD, -1, @pInputDate)), DATEADD(DD, -1, @pInputDate))
Try using DATEFIRST
to explicitly set the day of week to be regarded as the 'first'.
set DATEFIRST 1 --Monday
select DATEADD(DD, 1 - DATEPART(DW, @pInputDate), @pInputDate)
This will return the Monday of the week the InputDate falls in.