Setting Date Format in SQL Server

Try the below SQL command to find the default language setting and date format used. select name ,alias, dateformat from syslanguages where langid = (select value from master..sysconfigures where comment = 'default language') the Result will be as name alias dateformat ----------- ----------- ---------- us_english English mdy

we can change the default date settings in the sql server by using the command sp_addlanguage

The syntax of sp_addlanguage is

language (sysname ),
alias(sysname) ,
months (varchar(372)),
shortmons(varchar(132)) ,
days(varchar(217)) ,
dateformat(char(3)) ,

language = Official language name (British).
alias= Alternate language name (English).
months= Comma-separated list of full-length month names.
shortmons= Comma-separated list of short-month names.
days= Comma-separated list of day names, in order from Monday through Sunday.
dateformat=       Date order (for example, DMY).
datefirst=       First day of the week: 1 for Monday, 2 for Tuesday, and so on through 7 for Sunday.

for example

exec sp_addlanguage 'British', 'English',
   sp_configure 'default language', 1
   reconfigure with override

To set the default language back to U.S. English after having installed another language, use the following query:

   sp_configure 'default language', 0
   reconfigure with override
By sri sri   Popularity  (6209 Views)