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.
Watch the recorded webinar!
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Learn how to make your data more available, reduce costs and cut your build time