Seven Stars RAJ
Seven Stars

How to convert this sql case statement for tmap

Hi talend folks,

 

How to convert this sql case statement for tmap  

case
when CHL= 'S' then date_trunc('day',"DATE")
end DATE

Thanks
RAJ
2 REPLIES
Thirteen Stars TRF
Thirteen Stars

Re: How to convert this sql case statement for tmap

Hi,

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.

 

 


TRF
Thirteen Stars TRF
Thirteen Stars

Re: How to convert this sql case statement for tmap

Did this help?
If so, thank's to mark your case as solved.

TRF