Hi, We have just moved our application from SQL Server 2000 to 2005. The following code used to work without a problem, but now I am getting the following error, Msg 242, Level 16, State 3, Line 1 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. update COMMODITY set comm_qty = 189300, comm_um = 'LBR', load_date = '2013-03-11 00:00.00.00', user_id = 'kmpeters', proc_date_time = '2013-03-12 11:29.23.831', calc_weight = 189300, load_date_time = '2013-03-11 20:50.01.437' where car_init = 'ALAX' and car_no = '062545' and arrv_date_time = '2013-03-05 15:24.06.000' and compart_no = 1 I would appreciate any help. Thanks
I think it's to do with the use of '.' instead of ':' to separate minutes from seconds. I could, of course, be wrong. What is your server's default dateformat? And does your client code set a custom format before you start? What was the original server's dateformat? See
http://msdn.microsoft.com/en-gb/library/ms189491(v=sql.90).aspx for more.