Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

NetworkDays Expression

Hello,

I am looking to do an expression similar to a networkdays one,  however I do not want the days I want to show the number of hours.

My dates are set up as follows:

ACTIVITY_DATE = DD/MON/YYYY hh:mm

ACTIVITY_END = DD/MON/YYYY hh:mm

So when using the normal networkdays expressions (=NETWORKDAYS(ACTIVITY_DATE,ACTIVITY_END))  I received 0 as the activity has happened on the same day.  Is there a way of calculating the hours?

Thank you.

5 Replies
MK_QSL
MVP
MVP

=TIME(ACTIVITY_END , ACTIVITY_DATE, 'hh:mm:ss')

Not applicable
Author

Does't seem to like the , before 'hh:mm:ss' and comes up with an error. 

MK_QSL
MVP
MVP

Try this...


=TIME(Timestamp#(ACTIVITY_END,'DD/MMM/YYYY hh:mm') - Timestamp#(ACTIVITY_DATE,'DD/MMM/YYYY hh:mm'),'hh:mm')

Not applicable
Author

Hi,

You can try

=NetWorkDays(ACTIVITY_DATE, ACTIVITY_END) + Frac(Time(ACTIVITY_END-ACTIVITY_DATE, 'hh:mm'))

Not applicable
Author

Hi

Use Interval() function.

Interval(ACTIVITY_END-ACTIVITY_DATE, 'D hh:mm')