Try aomething like this
tinput = @ get number of days to advance
tholdays = tinput
FOR ;
tloop = 0 TO tinput
IF ;
CDOW(DATE() + tloop) = "Saturday" OR ;
CDOW(DATE() + tloop) = "Sunday"
tholdays = tholdays + 1
ENDIF
ENDFOR
Here's a simple function that will gove you the total number of work days within two dates inclusive. To make it exclusive either on the start_date or end_date, just increase the start_date by one, or decrease the end_date by one respectively.
************************
function cal_days
************************
para start_date, end_date
private total
total=0
do while start_date<=end_date
if dow(start_date)#1.and.dow(start_date)#7
total=total+1
endif
start_date=start_date+1
enddo
return total
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.