I am working on automating some data that I receive from Germany. The Date format comes in as DD.MM.YYYY and I need it to be MM/DD/YYYY.
I am building an import package using SSIS and I added a derived column to change the date format.
I first tried to use
but I keep getting an error at the Derived Column when I execute the package.
[Derived Column ] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Derived Column" failed because error code 0xC0049064 occurred, and the error row disposition on "Derived Column.Outputs[Derived Column Output].Columns[Date]" specifies failure on error.
So I moved through the many examples in StackExchange (all that I could find at least) and was met with the same error or not the desired output.
1) Source :- Flat file use DT_date for Date column
2) Derived Column :- Replace this with using
SUBSTRING([Column 2],4,4) + “/” + SUBSTRING([Column 2],5,2) + “/” + SUBSTRING([Column 2],7,2)
and use DT_DATE IN Datatype
3) Destination :- Use datetime as datatype for date
— Issue with date column… use DT_Date and then in derived column use substring to include
// so date will become 2009/02/05 and then transfer data to destination...
it will work out..
I fixed the error by using the Substring Method that was provided by user3112708 and making an minor alteration to the numbering sequence.
SUBSTRING(CalendarDay,4,2) + "/" + SUBSTRING(CalendarDay,1,2) + "/" + SUBSTRING(CalendarDay,7,4)
Thank you every one for your help.