conversion of a varchar data type to a datetime data type resulted in an out-of-range value

后端 未结 7 2418
梦毁少年i
梦毁少年i 2020-11-27 06:33

I have the following piece of inline SQL that I run from a C# windows service:

UPDATE table_name SET 
    status_cd = \'2\', 
    sdate = CAST(\'03/28/2011 1         


        
7条回答
  •  轮回少年
    2020-11-27 07:18

    It's a date format issue. In Ireland the standard date format for the 28th of March would be "28-03-2011", whereas "03/28/2011" is the standard for the USA (among many others).

提交回复
热议问题