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: 
madhuqliklondon
Creator II
Creator II

Composite Key with date

Hi all,

I am creating a composite key to join two tables to get matching values. 

I am using below composition but it is returning only up to number, please correct me.

ID &'|'& Number &'|'& Date(Date#( DateTime, 'DD/MM/YYYY HH:MM:SS'),'DD-MM-YYYY') As _Key

Data: 

 [ ID, Number, DateTime

   22,564746474647, 15/07/2020 20:04:45

]

current output: 22|564746474647|

Expected output: 22|564746474647|15-07-2020

Thanks in advance

Labels (3)
1 Solution

Accepted Solutions
madhuqliklondon
Creator II
Creator II
Author

This worked for me 

ID &'|'& Number &'|'& Date(Floor( Date(DateTime)),'DD/MM/YYYY') AS _Key

Thank you Kush for your support and time.

 

View solution in original post

2 Replies
Kushal_Chawda
MVP
MVP

try below

ID &'|'& Number &'|'& Date(floor(timestamp#( DateTime, 'DD/MM/YYYY HH:MM:SS')),'DD-MM-YYYY') As _Key

madhuqliklondon
Creator II
Creator II
Author

This worked for me 

ID &'|'& Number &'|'& Date(Floor( Date(DateTime)),'DD/MM/YYYY') AS _Key

Thank you Kush for your support and time.