Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
john_duffy
Partner - Creator III
Partner - Creator III

Elapsed time in hours

Hello All.

I am trying to calculate the elapsed time between 2 timestamps.  I am achieving this with the interval and NetWorkDays functions.  My formula gives me the correct results in hh:mm format.  The users would like the results in hours only.

In the attached example, the elapsed time is calcluated correctly as 74 hours and 35 minutes (74:35).  The user would like to see the elapsed time as 74.58 (74 hours plus 35/60 of an hour).

I can't seem to get the elapsed time in the second format.  I am using QV10 SR2.

Any help would be appreciated.

Thanks,

John.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try Elapsed_Time * 24, or formatted as number with two decimals like

=num( Elapsed_Time*24, '##0.00')

Note:

You will notice that this returns 74.60, but this seems ok to me since your elapsed time shows in fact a duration of 74:35:59 in format hh:mm:ss.

View solution in original post

4 Replies
swuehl
MVP
MVP

Try Elapsed_Time * 24, or formatted as number with two decimals like

=num( Elapsed_Time*24, '##0.00')

Note:

You will notice that this returns 74.60, but this seems ok to me since your elapsed time shows in fact a duration of 74:35:59 in format hh:mm:ss.

Not applicable

Hi John are you all right ?

You just need to multiply Elapsed_Time for 24 hours.

QlikView is understanding the number as days 3,..

Multipling for 24 hour you get the time in hours, then you format as hours

Ok

john_duffy
Partner - Creator III
Partner - Creator III
Author

Works perfect.  The 59 seconds was exactly why all my attempts were slightly off.

Thank you so much.

John.

john_duffy
Partner - Creator III
Partner - Creator III
Author

Thanks Guilherme.