************************* PROCEDURE calcwrkdays PARAMETERS tdStart,tdEnd LOCAL lndays,ldcurDate lndays=0 ldcurDate=tdstart DO WHILE ldcurDate<tdend IF DOW(ldcurDate)<6 lndays=lndays+1 ENDIF ldcurDate=ldcurDate+1 ENDDO =MESSAGEBOX("There are "+TRANSFORM(lndays)+" working days in this period",64,"Tools") ************* **Can be used as 'DO calcwrkdays WITH {^2001/01/31},{^2002/01/31}'