I can guess, but let's be sure. What calculations did you try?
Also, are holiday closures a concern?
Ummm. Nevermind. As usual, I didn't slow down and read the calculation closely enough. I got the following to work:
Int((EndDate - StartDate)/7) * 5 + If(DayofWeek(EndDate) < DayofWeek(StartDate),
Min(5, DayofWeek(EndDate) - 1) + Max(0, 6-DayofWeek(StartDate)),
If(DayofWeek(StartDate) < 7, Min(6,DayofWeek(EndDate)) -
Have a great evening.
No kidding! You never know what I might produce. Do the calculations you suggest involve the table "DATES"? I saw that and was interested, but I got the other one to work. Does your solution involve adding tables?
It adds a table with one record for each day of the year. A looping script can create a years worth of records in this table very quickly. Then you set up a layout and the needed controls so that you can close specific dates. This involves one method or another of closing specific days of the week--such as weekend days such that only one user action needs close that day of the week for all records in the table. Then someone consults the company calendar and clicks on the holiday date records to close them.
Computing business days then becomes a case of counting all the "open" records in this table that fall on a specified date range--which does not require a script to do.