Between dates condition in TMap Expression builder
Hi all, I am new to Talend and I have a requirement where if my “date field” falls within a range then I need to map Colum A or else I need to Map column B from source to a column in destination and I am trying to achieve this in expression builder in tMAP Here is an example of what I am trying to achieve IF start_date is between ‘01/10/2015 and 01/10/2016’ Then Column A Else column B Thanks in advance
Re: Between dates condition in TMap Expression builder
Hi, In tMap, there is ternary if-else operator. The expression is Condition?value if true: value if false You can filter your date by using Talend methods from TalendDate system routines. TalendDate.compareDate(new Date(),new Date(),"yyyy-MM-dd")
Best regards Sabrina
-- Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.