Skip to main content

Working days and hours calculations for custom weekends

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Working days and hours calculations for custom weekends

Last Update:

Jul 4, 2020 8:27:08 PM

Updated By:

Kushal_Chawda

Created date:

Jul 4, 2020 8:27:08 PM

Attachments

Previously I had created the document for calculating working hours between two dates excluding weekends (Saturday & Sunday) & holiday using networkday function.


But what if the weekends are not the Saturday & Sunday (for eg. It is Thursday & Friday)? What if there is only Sunday as weekend and not Saturday. Networkday function won't be useful in this scenario. Of course, there are many other ways to do it and I am going to demonstrate one of the ways here in this post. 

I have covered all scenarios step by step in attached word document. Also, attached example qvf files. This code will work for QlikView as well.

We can use the logic described here to work for any defined weekends, but for regular weekends (Saturday & Sunday) I would advise to use inbuilt Networkday function for working day calculation, for working hour calculation you can refer to my previous document as defined in below link

Working-Hours-Calculation-excluding-weekends-and-holidays

Feel free to provide any suggestions. 

Contributors
Version history
Last update:
‎2020-07-04 08:27 PM
Updated by: