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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Kpim
Partner - Contributor
Partner - Contributor

Link two tables using dates

Hi everyone, 

I have two tables that I am trying to link using a composite as the dates are not in the same format. 

Table 1                                                                                             Table 2 

Consultant                                                                                         Consultant 

Hour Date ('dd/mm/yyyy hh:mm:ss')                                                 Date ('dd/mm/yyyy')

Hour(Hour Date) as HOUR                                                               Hour

Consultant & ' | ' & Hour Date & ' | ' & Hour                                       Consultant & ' | ' & Date& ' | ' & Hour

I did this key but the hour fields don't link.  How can I fix it ?

Labels (2)
3 Replies
Chanty4u
MVP
MVP

May be this...create composite key from both the table 

From source 1:

    Consultant & ' | ' & Date(Hour Date, 'DD/MM/YYYY') & ' | ' & Hour as CompositeKey

From source 2':

    Consultant & ' | ' & Date & ' | ' & Hour as CompositeKey

Kpim
Partner - Contributor
Partner - Contributor
Author

Thank you for responding. 

Yes, I did what you have provided. But it still does not link my hour fields. 

vinieme12
Champion III
Champion III

Floor() the timestamp field to remove the time part

Consultant &'|'&Date(Floor(timestamp#(hourdate,'dd/mm/yyyy hh:mm:ss'))) &'|'&Hour(Hourdate) as keyfield

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.