Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
What is the output that you expect to see for your above inputs?
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.
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)
Maybe have a look at the suggested solutions here: