Results 1 to 2 of 2

Thread: date convert error 2004-05-13 24:00:00.000

  1. #1
    Join Date
    Sep 2002
    Posts
    159

    date convert error 2004-05-13 24:00:00.000

    Hi I importing data from db2 into sql
    using openquery
    In some case I have problem with date

    example
    DB2 date = '2004-05-13 24:00:00.000000'

    I tried to convert it manually

    sql server
    select cast('2004-05-13 24:00:00.000'as datetime)

    Server: 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.

    do I have to substruct - 1 millisecond ?

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •