I have a column named Paid_Date
in my table that has a kind of improper date value with a colon in between date and the time values (e.g. '04MAY2015:00:00:00'
).
In order to exclude that colon, I have used an expression
((DT_DBTIMESTAMP)SUBSTRING(PAID_DATE,1,9))
in my Derived Column transformation.
When I try running this, I'm getting the following error.
Expression used in my trasformation: (DT_DBTIMESTAMP)SUBSTRING(PAID_DATE,1,9) Source column data type : varchar Source column Value: 04MAY2015:00:00:00 Error: [Derived Column [1613]] Error: An error occurred while attempting to perform a type cast. Detailed Error:[Derived Column [1613]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (1613)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "PaidDate" (1954)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
I have even tried to use the following expression:
(DT_DBTIMESTAMP)((DT_STR,50,1252)SUBSTRING(PAID_DATE,1,9))
Is it not possible to convert a string after a SUBSTRING
operation?