I have a flat file trailer row that looks like this: T|3|2007120713:39:59
I'm able to extract the row using conditional split but I want to convert the datatime string into datatimestamp so I can insert it into a table. I built the derived column expression as following but got errors such as "The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis." I've been looking at this for hours with no luck. And is there other alternative to convert this column? Any help would be grately appreciated!!
(DT_DBTIMESTAMP)(SUBSTRING(Line,FINDSTRING(Line,"|",2) + 1,4)+"-"+SUBSTRING(Line,FINDSTRING(Line,"|",2) + 5,2)+"-"+SUBSTRING(Line,FINDSTRING(Line,"|",2)7,2)
+" "+SUBSTRING(Line,FINDSTRING(Line,"|",2) + 9,8))
I'm able to extract the row using conditional split but I want to convert the datatime string into datatimestamp so I can insert it into a table. I built the derived column expression as following but got errors such as "The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis." I've been looking at this for hours with no luck. And is there other alternative to convert this column? Any help would be grately appreciated!!
(DT_DBTIMESTAMP)(SUBSTRING(Line,FINDSTRING(Line,"|",2) + 1,4)+"-"+SUBSTRING(Line,FINDSTRING(Line,"|",2) + 5,2)+"-"+SUBSTRING(Line,FINDSTRING(Line,"|",2)7,2)
+" "+SUBSTRING(Line,FINDSTRING(Line,"|",2) + 9,8))