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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

compare Date between 2 dates

Hello,

I have 2 Tables

Dates.txt:

Date

2019-05-05

2019-05-20

2019-05-30

SecondTable.txt:

Week,StartDate,EndDate

Week1,2019-05-01,2019-05-07

Week2,2019-05-08,2019-05-14

Week3,2019-05-15,2019-05-21

Week4,2019-05-22,2019-05-31

 

Need Result as :

Date

2019-05-05   Week1

2019-05-20   Week3

2019-05-30   Week4

 

i have use Comparedate but not working..So please help.

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

    The issue can be resolved by below method. Please refer the screenshots.

 

0683p000009M6Ca.png

 

0683p000009M6Cf.png

The function is as shown below.

 

TalendDate.compareDate(row2.StartDate,row1.date)<=0 && TalendDate.compareDate(row1.date,row2.EndDate )<=0

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi,

 

    The issue can be resolved by below method. Please refer the screenshots.

 

0683p000009M6Ca.png

 

0683p000009M6Cf.png

The function is as shown below.

 

TalendDate.compareDate(row2.StartDate,row1.date)<=0 && TalendDate.compareDate(row1.date,row2.EndDate )<=0

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂