SQL to AS400 - datetime to timestamp conversion

  • I'm trying to setup a package to copy data to AS/400. 1 of the column is datetime and its failing due to the below error.

    "The value could not be converted because of a potential loss of data."

    The datetime is transformed using derived column with the below expressions. Both failed.

    REPLACE((DT_WSTR,23)FTAtsEdit + ".000000",":",".")

    OR

    (DT_WSTR,23)FTAtsEdit + ".000000"

    The source column is retrieved using the below expression.

    Cast(Convert(VarChar(20), Columnname ,120) As DateTime)

Viewing post 1 (of 1 total)

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