I have tried converting a date in the format 23/12/2001 to 2001-12-23 using the following in ssis but I keep getting an error.
ISNULL(Date_Of_Birth) ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)
(SUBSTRING(Date_Of_Birth,FINDSTRING(Date_Of_Birth,"/",2) + 1,4) + "-" + RIGHT("0" +
SUBSTRING(Date_Of_Birth,1,FINDSTRING(Date_Of_Birth,"/",1) - 1),2) + "-" + RIGHT("0" +
SUBSTRING(Date_Of_Birth,FINDSTRING(Date_Of_Birth,"/",1) + 1,FINDSTRING(Date_Of_Birth,"/",2) -
FINDSTRING(Date_Of_Birth,"/",1)),2))
I used the one on todds blog (http://toddmcdermid.blogspot.co.uk/2008/11/converting-strings-to-dates-in-derived.html) but it seems not to work for me for some reason. Can anyone explain how I can go about this
Maybe write the .NET code in the script task to convert the date format is the better idea: