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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hours within period

Hi,

I have a series of Time Stamps. Let's call series one Start_Date and series two End_Date. If Start_Date is 17/03/2011 13:00:00 and End_Date is 24/03/2011 13:00:00, I want to calculate the hours between the two dates minus weekend hours. In this example it would be 7 calendar days but only 5 week days. What I'm currently getting is 120 hours. What my aim is, is to get 120 hours - 48 hours (for the weekend) = 72 hours.

Please could someone give me an idea on how to do this.

Thanks,

Shane

Labels (1)
3 Replies
Not applicable
Author

Hi Shane,

you must use the function

=



NetWorkDays(Start_Date,End_Date)

It returns the number of working days (Monday-Friday) between and including start_date and end_date

Kindly,

Anonymous
Not applicable
Author

Shane,
What is your calculation? Where the 120 hours come from? Maybe it is correct?
7 days is 7x24=168 hours. Subtract 48, and you get the the same 120.

Not applicable
Author

thanks for the responses. I think I can work with Networkdays (with a bit of tweaking). To answer your question Michael, I meant that I would like to get 120 hours instead of 168 but I think that Networkdays could help me. Thanks guys