Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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