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

前端 未结 8 1162
孤城傲影
孤城傲影 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:42

    In order to avoid dealing with these very boring issues, I advise you to always parse your data with the standard and unique SQL/ISO date format which is YYYY-MM-DD. Your queries will then work internationally, no matter what the date parameters are on your main server or on the querying clients (where local date settings might be different than main server settings)!

提交回复
热议问题