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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Difference between Date and Time

Hi Experts,

I have data like below format

Closed Date,Open Date

10/10/2017 12:15:00 P.M.,10/10/2017 12:05:00 P.M.

27/01/2018   1:00:00 P.M., 25/10/2018 11:00:00 A.M.

I have to calculate difference in between Closed Open-Open Date in Minutes.

Expected Output:-

1) 10(Minutes)

2) 30000(Minutes)       (25,26,27 dates calculation hours  50*60=3000)

omarbensalembpngwassenaarmbaeyens

Regards

Mahesh

13 Replies
pradosh_thakur
Master II
Master II

In your sample data you have used the date 25/10/2018 but in sample output used the date as 25/01/2018 . I have used the later to get the calculation. Check my answer below.

Learning never stops.
qlikview979
Specialist
Specialist
Author

Hi Bro,

thanks for you help.

I tried with my source file its showing plank.

please try with my data.

pradosh_thakur
Master II
Master II

load the files simply and

Use this as expression

Interval([ClosedTime]-[OpenTime],'mm')


Capture.PNG

Learning never stops.
qlikview979
Specialist
Specialist
Author

Hi Bro's

For your reference i am attaching snapshot.

Diff.PNG

In the above snapshot i have selected close and open dates  and the difference between two dates is 91 days

i have to calculate open time from 1:22:51 to End of the day(11:59:00) and Closed time till(9:52:48).

no need to calculate 24 in open and closed days

for example:-

91*24=it will give 2184(hours)

here i want exclude 13 hours 21 min  from open time(we need to consider from 1:22:51 P.M.) and we need to add 9 hours  52 min from closed time

final result is

2184*60=131040-800(excluding 800 min from Open time )and including 592  min from Closed time.

=131040+592=131632(minutes)

Regards

Mahesh