Since two days, I suddenly experience trouble inserting datetime values on my contracters sql server
As example I can created a table like this:
CREATE testDateTime
(dateTime DATETIME)
and insert:
insert testDateTime (dateTime)
values ('13-8-2005 11:56:39')
this works OK on my local Microsoft SQL Server 2000, but since two days not anymore on my contracters Microsoft SQL Server ("The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value")
Maybe they had an upgrade with changes in the way datetime values are handled? I sent an email to the administators of my contractors webserver, and I will put a question on a Microsoft SQL Server forum. I have the same problem with inserting smalldatetime valuesThe interpretation of the datetime value depends on the language and date format setting. For example, if you SET LANGUAGE to us_english then this will not work. You need to use the ISO format to make sure that the datetime value is interpreted correctly irrespective of language or date format setting. So do instead: '20050813T11:56:39'.|||Feel like reading some more? :)
http://www.karaszi.com/SQLServer/info_datetime.asp
http://www.sql-server-performance.com/fk_datetime.asp
--
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Ich unterstütze PASS Deutschland e.V. (http://www.sqlpass.de)
No comments:
Post a Comment