Avatar of earwig75

asked on 

Problem with SSIS Package, derived column

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))
Microsoft SQL ServerMicrosoft SQL Server 2008SSISSQL

Avatar of undefined
Last Comment

8/22/2022 - Mon