Calc # Or Working (Week) Days Between Two Dates

This formula will calculate the number or working (week) days between any two
dates.
StartDate is the early date and EndDate is the ending date (obviously). This
will not take any holiday/vacation days into account. You could add extra code
to access a holiday schedule and add that into the calculation.
diffDays := (EndDate - StartDate) / 86400;
strtDay := @Modulo(@Weekday(StartDate); 7);
endDay := @Modulo(@Weekday(EndDate); 7);
weekdays := (diffDays - endDay + strtDay - 7) * 5 / 7 - @Max(-2; -strtDay) -
@Min(1; endDay) + 5 - strtDay + endDay
This was first published in November 2000

Dig deeper on Lotus Notes Domino Formula Language

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close