I have a Query where I get the WeekDay of a date but by default:
Sunday = 1
Moday = 2
etc.
This will do it.
SET DATEFIRST 1; -- YOUR QUERY
Examples
-- Sunday is first day of week set datefirst 7; select DATEPART(dw,getdate()) as weekday -- Monday is first day of week set datefirst 1; select DATEPART(dw,getdate()) as weekday