Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Finding working days excluding weekend and holidays

Hello All,

I have a situation where I have to find out difference between 2 timestamp based date for one activity excluding weekends and public holidays.

Below is an example;

Task A

Start time - 01/10/2015 13:45:32

End Time - 09/10/2015 17:52:12

Public holiday - 02/10/2015

I tried with networkdays which is giving me number of days but that doesn't fulfil my requirement. I would like to calculate timing from when it actually started.

Kindly advise.

Regards,

Imran Khan

4 Replies
sunny_talwar

What is the output that you expect to see for your above inputs?

Anonymous
Not applicable
Author

Difference between 2 dates in days like 4.5 days something real excluding weekends and public holidays. Networkdays will give me actual days though I have got the task very close to close of business hours. I want it to count 1 day from the time it started to the same time very next day. Interval is giving me the expected value but I m unable to exclude weekends and holidays. Also, I want it to apply at script level. I m having 15 public holidays in a year.

maxgro
MVP
MVP

maybe

the network days between start date + 1 and end date -1

+ the time between start time and midnight (if not weekend, not holiday)

+ the time between midnight and end time (if not weekend, not holiday)


swuehl
MVP
MVP

Maybe have a look at the suggested solutions here:

Re: Calculate hours between two Date/Time strings