4 Replies Latest reply: Jun 8, 2017 4:30 AM by sello mputsoe RSS

    Difference between Date timestamps in Qlik Sense

    sello mputsoe

      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!