newbie0423
IS-IT--Management
Hi I have a report that shows the days that a surgeon performs cases. I would like to exclude his weekends cases. I have tried to use the below formula that I got from previous posts. However, it is only returning 1.00. Can someone please tell me what I'm missing.
WhileReadingRecords;
Local DateVar Start := {@startdate};
Local DateVar End := {@enddate};
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
DateVar Array Holidays;
Weeks:= (Truncate (End - dayofWeek(End) + 1
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
(if DayOfWeek(Start) = 1 then -1 else 0) +
(if DayOfWeek(End) = 7 then -1 else 0);
Thanks
V
WhileReadingRecords;
Local DateVar Start := {@startdate};
Local DateVar End := {@enddate};
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
DateVar Array Holidays;
Weeks:= (Truncate (End - dayofWeek(End) + 1
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
(if DayOfWeek(Start) = 1 then -1 else 0) +
(if DayOfWeek(End) = 7 then -1 else 0);
Thanks
V