

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DateTime difference in Day Hours Minute Format in Qlik Sense
Hi Everyone
I want to calculate the date and time difference in Day Hours Minute Format
Suppose there are two dates
Date 1: 01/04/2018 10:20:00 AM (date format is MM/DD/YYYY)
Date 2: 01/06/2018 11:40:00 AM
The Result Should be: 2 Day 1 Hour 20 Min
Is this possible ???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check Interval function
Ex:-
interval( A-B, 'D hh:mm' )
interval( Date1-Date2, 'D hh:mm' )


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anand
Thanks for your reply
The result is correct but the problem is:
1. I am calculating Average. With Avg function this is not working. My Measure is like this:
Avg(if(TRANSACTION_TYPE='DELIVER', interval(TRANSACTION_DATE - REC_TRANSACTION_DATE,'D hh:mm')))
2. The result is like this "2 50:45" can I get like 2 days 50 hrs 45 min


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anand
Average problem is solved
I need only (2 days 50 hrs 45 min) format

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This worked for me:
replace(
replace(
interval(date_end - date_start, 'D hh:mm' )
, ' ', ' days, ')
, ':',' hrs, ')
&' min'
