Change default date time format on a single database in SQL Server

前端 未结 8 1144
孤城傲影
孤城傲影 2020-11-30 05:16

I need to change the date format from US (mm/dd/YYYY) to UK (dd/mm/YYYY) on a single database on a SQL server machine.

How can this be done?

I\'ve seen state

8条回答
  •  时光取名叫无心
    2020-11-30 05:34

    You can only change the language on the whole server, not individual databases. However if you need to support the UK you can run the following command before all inputs and outputs:

    set language 'british english'
    

    Or if you are having issues entering datatimes from your application you might want to consider a universal input type such as

    1-Dec-2008

提交回复
热议问题