Drucifer1968
IS-IT--Management
I'm sure I'm missing something simple - my original formula is below, but it only removes Saturday and Sunday from the count if they are the start or end dates of the report. How can I evaluate all dates between d1 and d2 and remove all Sat and Sun?
----------------
Global DateTimevar d1;
Global DateTimevar d2;
Global Numbervar businessdays;
//--------------------------------------
d1 := {?Start Date};
d2 := {?End Date};
businessdays := (datediff("d", d1,d2) - (datediff ("ww", d1,d2, crsaturday)- datediff ("ww", d1,d2,crSunday)));
if dayofweek(d1) = 7 then businessdays-1;
if dayofweek(d1) = 1 then businessdays-1;
businessdays
----------------
Global DateTimevar d1;
Global DateTimevar d2;
Global Numbervar businessdays;
//--------------------------------------
d1 := {?Start Date};
d2 := {?End Date};
businessdays := (datediff("d", d1,d2) - (datediff ("ww", d1,d2, crsaturday)- datediff ("ww", d1,d2,crSunday)));
if dayofweek(d1) = 7 then businessdays-1;
if dayofweek(d1) = 1 then businessdays-1;
businessdays