The Derived Column transformation creates new column values by applying expressions to transformation input columns. An expression can contain any combination of variables, functions, operators, and columns from the transformation input.
To convert Datetime to Date, we have to use "DT_DBDATE" data type.
I have an input text file, which consists of few columns namely TransactionID
, receiveddt
, description
etc. The recieveddt
column has date value in the following format 120419
(yymmdd)
. I would like to load the .txt input file into a database but the destination column recieveddt
is of data type DateTime
. I used the derived column transformation to convert the incoming receiveddt column value to datetime as shown below
Derived Column Name Derived Column Expression Data Type
------------------- ----------------- -------------------- ---------
receiveddate replace reciveddt (DT_DATE)[reciveddt] datetime
I tried different combinations but I keep gettings errors while attempting to perform a type cast.
How can I convert string (YYMMDD) to datetime using derived column transformation?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With