Hi talend folks,
How to convert this sql case statement for tmap
when CHL= 'S' then date_trunc('day',"DATE")
To have the result as a date try this:
row1.CHL == 'S' ? TalendDate.parseDate("dd/MM/yyyy", TalendDate.formatDate("dd/MM/yyyy", row1.yourField))) : row1.yourField
Hope this helps.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to make your data more available, reduce costs and cut your build time
Read about OTTO's experiences with Big Data and Personalized Experiences
Pick up some tips and tricks with Context Variables