1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
* Here is a way to compute elapsed weekdays *.
data list / date1 1-8 (ADATE) date2 10-17 (ADATE) .
begin data
01/20/98 02/28/98
02/12/98 02/18/98
end data.

* Just a baseline normal number of days* .
COMPUTE DAYS =CTIME.DAYS(date2-date1).

*Note dates are stored in seconds, 86400 per day * .
COMPUTE WKDAYS=0.
LOOP #=date1 to date2 BY 86400.
If RANGE(XDATE.WKDAY(#),2,6) WKDAYS=WKDAYS +1.
END LOOP.

list.