Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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 
Labels (2)
1 Reply
Anonymous
Not applicable
Author

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