
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Difference between Date timestamps in Qlik Sense
Hi Community, I have been struggling for a while now with simply calculating a number of hours or even days between two date timestamps in Qlik Sense. I found a few suggested solutions from the community but I cannot seem to find one that fits my scenario 100%.
Please kindly assist. I simply want to see the difference between the start and the completed date in hours or days.
Please see attached sample source data file.
I have tried these 3 approaches with no success:
1. Interval((date(timestamp#("Complete Time",'DD-MM-YYYY hh:mm:ss),'DD-MM-YYYY')) -
(date(timestamp#("Start Time",'DD-MM-YYYY hh:mm:ss'),'DD-MM-YYYY')), 'd')
2. Ceil(Interval(Date#("Complete Time",'DD-MM-YYYY hh:mm:ss')- Date#("Start Time",'DD-MM-YYYY hh:mm:ss'),'d'))
3. Interval(Date(Floor(Date("Complete Time" -"Start Time",'DD'))))
Thanks in advance!
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Interval(TimeStamp#([Complete Time], 'DD/MM/YYYY hh:mm:ss) - TimeStamp#([Start Time], 'DD/MM/YYYY hh:mm:ss'), 'd')
Note that your date is using / instead of -.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May be as in attaced file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Sunny, I still cannot seem to return expected results with the above

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Andrey, exactly what I am looking for!!.
Thanks a lot everyone!
