Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaytrip
Creator
Creator

Difference between two dates

date.PNG

I WANT TO SHOW THE DIFFERENCE BETWEEN THE TWO DATES (The FIRST Col - The SECOND Col) and plot their values on a bar chart.
How can that be done ?
Thanks

15 Replies
Anil_Babu_Samineni

Try this?

TimeStamp(Field1, 'MMM D YYYY hh:mmTT') - TimeStamp(Field2, 'MMM D YYYY hh:mmTT')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
abhaytrip
Creator
Creator
Author

Hey ,

I tried this but it isn't working at all. shows no values.

its_anandrjs

Did you try Interval function.

abhaytrip
Creator
Creator
Author

Yes I did , But I couldn't fetch any results.

Anonymous
Not applicable

interval(Col1 - Col2, 'DD hh:mm ')

abhaytrip
Creator
Creator
Author

Tried that as well , 😕

date1.PNG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If those are names of fields with multiple values, better create a straight table with a separate row for each value combination for real_survey_date_sent and date_survey_received, and add an expression with one of the suggestions posted before.

Specifying a field name in a text box will return all values at once. And subtracting all values from all values will lead to a NULL result.

abhaytrip
Creator
Creator
Author

date2.PNG

Tried this , but No values are shown.

Anil_Babu_Samineni

Can you share image simply using

Date1 - Date2 ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful