>I was wondering if someone would know of a reliable algorithm to count the number of Saturdays and the number of Sundays between 2 dates (inclusively)...?
>
>Laterness,
>Jon
FUNCTION CountWeekEnd(dData1, dData2)
LOCAL ret_val
DO WHILE dData1 <= dData2
IF INLIST(DOW(dData1,1),1, 7)
ret_val = ret_val + 1
ENDIF
dData1 = dData1 + 1
ENDDO
RETURN ret_val
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.