Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I convert string (YYMMDD) to datetime using derived column transformation?

Tags:

People also ask

What is derived column transformation?

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.

How do I convert datetime to date in SSIS?

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?