Link to home
Start Free TrialLog in
Avatar of dxproz232
dxproz232

asked on

How to permanently change first day of week in SQL Server

I understand the use of DATEFIRST to change the first day of the week in the given session. Is there a way to change it globably once? (This customer ALWAYS starts their week on monday)
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

>> This customer ALWAYS starts their week on monday

Then you need to run the below statement at the beginning of all your sessions

SET DATEFIRST 1

>>  Is there a way to change it globably once?

Yes.. if you have the appropriate Language set whose Week starts on Monday..

SELECT * FROM sys.syslanguages

You can alter the login to begin with a Default Language like

ALTER LOGIN ur_login WITH DEFAULT_LANGUAGE = us_english

us_english has First day of week as Monday..

Hope this helps
Avatar of dxproz232
dxproz232

ASKER

Is there a way to change the default week start for a language?
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes you can control it.
You need just to define a specific Language for each login used to connect to database.
for example for user account "sa" you can open Security->.Logins->sa and change the language of this user to "British English" (other languages and their values for first day of the week is available from
EXEC sys.sp_helplanguage

Open in new window

>> You need just to define a specific Language for each login used to connect to database.
for example for user account "sa" you can open Security->.Logins->sa and change the language of this user to "British English

This is what I have suggested earlier using ALTER LOGIN statement..

>> change the language of this user to "British English" (other languages and their values for first day of the week is available from

Can you kindly let me know how to change the starting week for a particular language in SQL Server or OS..
You are right, It is not allowed to change the starting week for particular language in SQL Server