SteveHill, I copied your formula for future use, good stuff!
mOrgan, Here is aanother simple variation that may be useful:
The following formula calculates the number of working days in any given period. This is based on a Monday to Friday working week and does not allow for Holidays.
The function dayofweek is a Crystal reports function that returns a whole number (1 - 7) representing the days Sunday (day 1) to Saturday (day 7).
The function truncate is a Crystal reports function that rounds down the result of a calulation, always producing a whole number. Formula follows:
if (dayofweek(Start Date) > dayofweek(End Date) then
((End Date - Start Date) -
(truncate((End Date - Start Date)/7)*2)-1) else
if (dayofweek(Start Date) <= dayofweek(End Date)) then
((End Date - Start Date) -
(truncate((End Date - Start Date)/7)*2)+1)