> LPARAMETERS startdate, enddate > LOCAL cycle, tocycle, testdate, ret_val > ret_val = 0 > tocycle = enddate-startdate > FOR cycle = 0 TO tocycle > testdate = startdate + cycle > IF .NOT. INLIST(DOW(ScanDay,1), 6, 7) && friday, saturday > ret_val = ret_val + 1 > ENDIF > ENDFOR > >RETURN ret_val >>
>thisform.text3.value=thisform.CalculateDays(thisform.text1.value,thisform.text2.value) >>
>>*thisform.text1.value=startdate >>*thisform.text2.value=enddate >>thisform.text3.value=CalculateDays(thisform.text1.value,thisform.text2.value) >> >> >>FUNCTION CalculateDays(thisform.text1.value, thisform.text2.value) >> LOCAL cycle, tocycle, testdate, ret_val >> ret_val = 0 >> tocycle = enddate-startdate >> FOR cycle = 0 TO tocycle >> testdate = thisform.text1.value+cycle >> IF .NOT. INLIST(DOW(ScanDay,1), 6, 7) && friday, saturday >> ret_val = ret_val + 1 >> ENDIF >> ENDFOR >> >>RETURN ret_val >> >>>>