DATEFIRST « Date Functions « SQL Server / T-SQL Tutorial






10.5.DATEFIRST
10.5.1.To change the first day value, you can use the SET DATEFIRST command.
10.5.2.Using SQL Server's First Day of the Week Setting
10.5.3.SELECT DATEPART(weekday, CAST('20051004' AS DATETIME) + @@DATEFIRST);