INWKDAYS(<D start date>, <D end date>)
Evaluates the number of non-weekend days between two dates.
Returns <expN> number of non-weekend days between two dates.

Returns -1 if start date is greater than end date.

Useful in applications that handle dates by five-day working weeks.

date1 = CTOD("08/07/86")
date2 = CTOD("08/17/86")
date3 = CTOD("11/26/86")

INWKDAYS( date1, date2 ) returns 7
INWKDAYS( date1, date3 ) returns 80
INWKDAYS( date2, date3 ) returns 73
INWKDAYS( date3, date1 ) returns -1

Hazard
Does not take holidays that fall during the week into
consideration. To calculate the number of holidays between two
dates, you can set up a database file with one date field and
enter a record for each holiday that does not occur on a week end.

USE Holidays
COUNT FOR Holidate >= startdate .AND.
Holidate <= enddate TO h_count
days = INWKDAYS( startdate, enddate ) - h_count
USE && close files when no longer needed


Placed in the Public Domain by Tom Rettig Assoc.