I am trying to convert a string into Date using Derived column and I am using Flat File Source. I read bunch of articles on stackoverflow and followed the same steps but I am unable to convert my string into date format.
Here is the string
Tue Nov 25 17:32:03 EST 2008
And I want to show it like
2008-nov-25
I tried using the following code
(DT_DBDATE)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" + SUBSTRING(dateCreated,8,2))
I also tried to use
(DT_DATE)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" + SUBSTRING(dateCreated,8,2))
(DT_DBTIMESTAMP)(SUBSTRING(dateCreated,24,4) + "-" + SUBSTRING(dateCreated,4,3) + "-" + SUBSTRING(dateCreated,8,2))
Is this the correct way to convert the string into date format?