Date Conversion failure

  • been trying to load some data using an SSIS package... at some point where I convert fields of WSTR data type with the format of mm/dd/yyyy through a derived column using the (DT_DBTIMESTAMP) type cast the package fails with the error of converting into the specified type cast.

    Thus i took some sample values from the data viewer (5/23/2004, 1/10/2005) and applied the (DT_DBTIMESTAMP) to these in the derived column... Setting a data viewer following the derived column transformation revealed that all sample values appeared as "12/30/1899 12:00:00AM".

    The weird thing is that the package has been in usage since a long time and no changes have been applied to it or to critical variables such as regional settings, also given that the later is in conformity with the used date format with a standard of "m/d/yyyy"

    suggestions?!

    Regards,

    Samer.

  • When I import dates held as strings, I usually put them in universal format (YYYY-MM-DD HH etc etc) via a derived column and then map them to the target field. This always works.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Point is, that these fields need to be evaluated through certain conditions before being mapped to target destination. And it is at this stage when converted to date using the (DT_DBTIMESTAMP) type cast that they're yielding an erroneous value of "12/30/1899 12:00:00AM"

    which subsequently causes the package to fail!

    problem persists....

    Regards,

    Samer.

  • Can you give us the exact error, the expression that you use in the derived column editor and some sample data?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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