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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Vikash2024
Creator
Creator

Total time between two times

I have to times Created_time and Approved_time. I want to know total time between created to approval.
Example: Created_time                Approved_time                  total_Time
                   12:23:32                         1:03:32                               40 

So in this example it will take 40 min. how to achieve total time using both time in Qlik.?

Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

The issue you are facing is that qlik does not know which date your time is. It does not know that 1:03:32 is later than 12:23:32.

If you are able to create a timestamp consisting of both date and time information then you can subtract the first from the second.

 

Maybe this workaround will do it for you.

If(Approved_time<total_Time, total_Time, total_Time+1) - Approved_time 

View solution in original post

2 Replies
Vegar
MVP
MVP

The issue you are facing is that qlik does not know which date your time is. It does not know that 1:03:32 is later than 12:23:32.

If you are able to create a timestamp consisting of both date and time information then you can subtract the first from the second.

 

Maybe this workaround will do it for you.

If(Approved_time<total_Time, total_Time, total_Time+1) - Approved_time 

Vikash2024
Creator
Creator
Author

Time(Timestamp(Timestamp#(Approved_Time ,'DD-MMM-YYYY hh:mm:ss')) - Timestamp(Timestamp#(Created_Time, 'DD-MMM-YYYY hh:mm:ss')), 'hh:mm:ss') As Total_Time

I wrote above script to get the solution. It working.

Thank you for the response.