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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DEV4
Contributor III
Contributor III

Greater than equal to and less than equal to in tmap

HellO All,

Can you please help me with the below scenario.

If CREATEDON <= END_DATE and CREATEDON >= START_DATE then get the ACADEMIC_TERM_KEY

 

0683p000009M9fo.png

 

Please help me how and where to write this condition in tmap.

Thanks

Labels (5)
1 Solution

Accepted Solutions
Mehdi_Mhedhbi2
Contributor III
Contributor III

The first thing to do is to compare the two dates .

TalendDate.diffDate(date1 ,date2) : the diffDate function return the difference between two dates 

 if diffDate return   0                     then date 1 = date 2 .
if diffdate return something <0  then date 1 < date 2.
if  diffdate return  something >0 then  date1 > date 2 .
So in your case:  
Add this expression in the filter of row6 input. ( push on the first green arrow )  


(TalendDate.diffDate(row17.CREATEDON,row6.END_DATE=<0 
&& 
TalendDate.diffDate(row17.CREATEDON,row6.START_DATE) >=0 )

 

View solution in original post

1 Reply
Mehdi_Mhedhbi2
Contributor III
Contributor III

The first thing to do is to compare the two dates .

TalendDate.diffDate(date1 ,date2) : the diffDate function return the difference between two dates 

 if diffDate return   0                     then date 1 = date 2 .
if diffdate return something <0  then date 1 < date 2.
if  diffdate return  something >0 then  date1 > date 2 .
So in your case:  
Add this expression in the filter of row6 input. ( push on the first green arrow )  


(TalendDate.diffDate(row17.CREATEDON,row6.END_DATE=<0 
&& 
TalendDate.diffDate(row17.CREATEDON,row6.START_DATE) >=0 )