Hi,
Recently I had to do similar thing but in Visual FoxPro so I got this function that you call with your start and end date
** Date1,Date2 are arguments to this function**
ldStartDate= IIF(Date1> Date2,Date2,Date1)
ldEndinDate = IIF(Date1=> Date2,Date1,Date2)
lnNumberOfDays = ldEndinDate - ldStartDate
lnReturnDays = lnNumberOfDays
FOR iDays = 1 TO lnNumberOfDays
IF DOW(ldStartDate + iDays) < 7 AND ;
DOW(ldStartDate + iDays) > 1
lnReturnDays = lnReturnDays
ELSE
lnReturnDays = lnReturnDays - 1
ENDIF
ENDFOR
RETURN lnReturnDays
Hope this helps
Lyn