我有场:问题与SQL Server smalldatetime的插入查询
APP_DATE (smalldatetime)
我在做这个查询:
INSERT INTO table (TYPE, CODE, APP_DATE, DATE) VALUES ('APP', '123', '02/10/2010 12.30', GETDATE())
它失败:
Msg 296, Level 16, State 3, Line 1
Conversion from datatype char to smalldatetime generated a value not between the interval of valid values.
Instruction has been interrupted.
(0 row(s) affected)
我在做什么错误?在我看来,作为该领域的正确格式..
谢谢您的时间。
编辑:SQL Server 2000中
仍然没有工作: '02/19/2010 16:28'< - 相同的错误 – 0plus1 2010-02-23 15:00:13
@ 0plus1:工作对我来说很好..... – 2010-02-23 15:14:34
啊,我有SQL Server 2005.也许这就是问题所在。尝试更改日期的格式,也许'2010-19-02 16:28'?或许你已经得到了错误的区域设置,它认为19月份? – 2010-02-23 15:17:42