Problem with SSIS Package, derived column

earwig75 used Ask the Experts™
I am trying to import a .csv file into a table.  The column on the file is a date column formatted like this: 20160127

I need to import that into a date column in my SQL table. Can someone assist with a string I could use in my derived column? Thank you.

(DT_DATE)(SUBSTRING(problemDate,5,2) + "/" + SUBSTRING(problemDate,7,2) + "/" + SUBSTRING(problemDate,1,4) + " " + SUBSTRING(problemDate,9,2) + ":" + SUBSTRING(problemDate,11,2) + ":" + SUBSTRING(problemDate,13,2))
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I found and used this: (DT_DATE)(SUBSTRING([MyDateColumn],1,4) + "-" + SUBSTRING([MyDateColumn],5,2) + "-" + SUBSTRING([MyDateColumn],7,2))


I found and used this solution: (DT_DATE)(SUBSTRING([MyDateColumn],1,4) + "-" + SUBSTRING([MyDateColumn],5,2) + "-" + SUBSTRING([MyDateColumn],7,2))

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial