|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-02-26 : 07:51:56
|
| Navneet writes "Hi All,I am developing a web application in ASP.Net. It is a multilingual site. When I try to insert datetime in sqlserver for Italian culture using a sql query it gives me the following error.***********************************************************The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated. SET DATEFORMAT dmy; INSERT INTO TCE_COURSE_HEADER ( COURSE_VENDOR_ID, COURSE_VERSION, COMPLIANCE, FORMAT, CERTIFICATE, REGISTRATION_START_DT, REGISTRATION_UNTIL_DT, START_DATE, END_DATE, COURSE_WEIGHTAGE, COURSE_MEDIUM, OWNER_USER_ID, CREATOR_ID, CREATION_DATE, MODIFIER_ID, LAST_UPDATED, SCO_COMPLETION_CRITERIA, BASE_LANGUAGE_ID) VALUES ( 6,'',1,0,0,'24/02/2004','07/03/2004','24/02/2004','07/03/2004',100,1,-1,-1,'24/02/2004',0,'24/02/2004 11.22.56',1,26) The 'PR_INSERT' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead. ***********************************************************I tried to diagnose it and found that the problem is with the time seprator. Sql server only recognizes ":" as time seprator and for Italian culture "." is the time seprator. Is there any configurations availale in Sql server for specifing the time seprator because for dates it accepts "\" , "." , "-" but for time it only accepts ":" ?" |
|