Saving Dates in SQLServer

后端 未结 7 1326
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 00:16

I have a legacy application where the input is a date string, i.e.:

06/12/2009

The format of the input is always a string, and i

7条回答
  •  [愿得一人]
    2021-01-05 00:28

    See SET DATEFORMAT. The SQL 'culture' is set by SET LANGUAGE at a session level. SQL Server has its own date format settings, independent of the hosting OS. This is for several reasons: ANSI compliance, to prevent OS changes from affecting applications using the database hosted on that host and not least is compatibility, the SQL long predates the OS is currently running on.

提交回复
热议问题