Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sep 26, 2024 10:46:39 AM
Jul 4, 2020 8:27:08 PM
Previously, I created a document for calculating working hours between two dates, excluding weekends (Saturday and Sunday) and holidays, using the networkdays function. Please refer to the link below.
Working-Hours-Calculation-excluding-weekends-and-holidays
However, what if the weekends are not Saturday and Sunday (e.g., Thursday and Friday)? Or if only Sunday is considered a weekend, not Saturday? In such cases, the networkdays function won't be applicable. While there are many ways to address this, I will demonstrate one approach in this post.
I have detailed all scenarios step by step in the attached Word document and included example QVF files. This code is compatible with QlikView as well.
The logic described here can be applied to any defined weekends, but for regular weekends (Saturday and Sunday), I recommend using the built-in networkdays function for working day calculations. For working hour calculations, please refer to my previous document linked below.
Please feel free to share any suggestions.
Hi there, can you please help me with this, it shows nothing
TicketNo,StartTime, EndTime
1, 8/16/2010 7:00:00 , 8/16/2010 14:00:00
2, 8/16/2010 10:00:00 , 8/16/2010 13:30:00