String to Date Conversion and back to String

Two Stars

String to Date Conversion and back to String

Hi,

 

I am having a strange problem. My source is a Excel file which has a date field. I read the date field as string as it in 1-Jan-2017 format. Using tMap I convert it into Date and change it to  01-01-2016. Now when I again convert it back to string using tConvertType the month changes to 00. So irrespective of the date the month is defaulted to 00.

 

How do I overcome this issue ?

Eight Stars

Re: String to Date Conversion and back to String

HI,
Use Formatdate and parsedate together. It will solve your problem. Just check some old resolved topics of Old Talend Community. U will be able to do it