Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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')

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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 ??

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)