Date/Time Functions – @@DATEFIRST

I am on the home stretch with my writing of short articles or tidbits on Transaction SQL date/time functions. We already talked about functions like DATEPART() that returns the day of the week as an integer and DATENAME() that returns the day of the week as text. But what is the first day of the week? The default for the US English language is 7, or Sunday. However, this setting differs between countries. Today, I will be talking about @@DATEFIRST, a configuration function which returns the current session value and…