Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculate the minutes with two different dates

how to calculate the minutes from two different dates I am using interval(date1-date2,'mm') is it correct or not other wise how to write the code to calculate the minutes


5 Replies
Not applicable
Author

I don't understand. Do you want to calculate those dates in minutes? Or you want to extract the minutes from those dates?

tcullinane
Creator II
Creator II

interval should work, you could also just subtract one from the other and set the number format to interval and 'mm' when displaying

Not applicable
Author

yes plz tell me correct or not

anbu1984
Master III
Master III

Your expr is correct

=interval(Date#('1/2/2014','M/D/YYYY')-Date#('1/1/2014','M/D/YYYY'),'mm')

maxgro
MVP
MVP

date1 -date2 is a number

when date1 - date2 = 1 --> 1 day = 24*60 minutes

so I think you can just do the difference * number of minutes of a day

=(date1- date2)*(24*60)