Do we have any function that excludes (saturday and sunday) between two dates.
In excel we use networkdays() function to derive the result. What function we have to use for above scenario in WEBI?
Now I have dates like -
Approved Min Date = 6/7/06
Received Date = 4/17/06 , Now the result should come 38, but by using above formula I got 35 and when I used the first formula , I got the correct results.
I guess I am not using Dave’s formula perfectly or I am making some silly mistake.
This seems to work well bu I’m not sure why the Floor function is used ?
The first days between will give you a whole integer and the truncate bit in the latter part of the formula will give you a whole number so it basically whole number A - whole number B + 1 so the Floor bit is overkill as it is trying to round a whole number down to the nearest integer which will be the same number eg 9 rounded down is 9.
you may want to validate the results for the days start and end on the weekend of the same week, spanning from Sat to Sat, Sun and Sun to Sat, Sun of 1 week and many week. Based on my experience, I realised there are many test cases, which can be easily missed.
if u try the above formula u will get the exact result - 38
.
The above formula which will exclude weekends.
can anyone help me to exclude holiday too. ?
We had a request to exclude only Sunday, I have used Dave’s logic and implemented, it is working absolutely fine. Now the business is requesting to have the Turnover Time in actual hours/days Date Time
Actual Time Utilized
Start Date Friday 7/27/12 3:30 PM 8:30
Saturday 7/28/12 12:00 AM 24:00
Sunday 7/29/12 12:00 AM 00:00
End Date Monday 7/30/12 10:30 AM 10:30
Total Time 43:00
If I use dave’s the formula i get 3 working days (Excluding Sunday). However the actual time utilized is 43 hours which 1.79 day i.e. 2 days approx. I tried few things, but nothing is working out. Is there a way to get this.