How to set monday as first day of week in SQL Server -


i running sql server 2008 on machine regional settings have monday first day of week. if create computed column in table compute day of week date field 2 monday date instead of 1.

is there property table or database or server need set ?

the first day of week based on language settings of server. default setting us_english 7 (sunday)

you can find current first day of week using select @@datefirst


however, can use datefirst this. put @ top of query

set datefirst 1; sets monday first day of week current connection.

http://technet.microsoft.com/en-us/library/ms181598.aspx


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -