need to convert string(DDMMYYYY) to Date field YYYY-MM-DD
Posted: Thu Dec 09, 2010 4:45 am
Hi Guys,
I am getting Data from source in a flat file. There is a column D_DATE which will have data in the format DDMMYYYY. I need to convert it to YYYY-MM-DD. I used StringToDate function but in vain.
The Code i used are as well as
first one is giving me a output full of "*" , second one is throwing an error.
Can somebody let me know where i am going wrong.
Thanks for your help in advance.
I am getting Data from source in a flat file. There is a column D_DATE which will have data in the format DDMMYYYY. I need to convert it to YYYY-MM-DD. I used StringToDate function but in vain.
The Code i used are
Code: Select all
StringToDate(DSLink1.D_DATE,"%yyyy%mm%dd")
Code: Select all
StringToDate(DSLink1.D_DATE,"yyyy-mm-dd")
Can somebody let me know where i am going wrong.
Thanks for your help in advance.