Conversion Error

  • 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

  • Will work if you have your dates with another colon, like '2013-03-11 00:00:00.00'.

    John

  • Thanks. I should have noticed it.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply