Examples of @@DATEFIRST Function :
Example 1 : Use of @@DATEFIRST function in select clause
SELECT @@DATEFIRST
Output
7
Above example returns 7 as current day of the week.
Example 2 : Use of @@DATEFIRST function in select clause
SET DATEFIRST 1
SELECT @@DATEFIRST
Output
Above example sets the first day of the week to 1 i.e monday and assumes the current day is tuesday.