[AccessD] Days Past Due - Grace Period

Gustav Brock gustav at cactus.dk
Sat Sep 6 03:30:34 CDT 2003


Hi Doris

It is slightly more difficult. Step 3 should read:

Step 3:  Count the number of holidays not falling in weekends between
the two dates.

And why "+ 1" in step 4? Say, Tuesday to Friday is 3 days not 4.

Also, I cannot see how this will calculate intervals smaller than one
week when weekend days are included? Tuesday to Sunday is 4 working
days. Step 2 will give zero weeks, thus step 4 will return 6 days (or
5 without "+ 1").

/gustav


> Here is the pseudo-code for the calculation I use...

> Step 1:  Count the number of days between the two dates

> Step 2:  Count the number of weeks between the two dates and multiply the
> result by 2 (make sure to set FirstDayOfWeek to Monday)

> Step 3:  Count the number of holidays between the two periods

> Step 4:  Calculate the result (DaysResult = Step 1 - Step 2 - Step 3 + 1)

> Step 5:  Figure out if the result meets your "past due" criteria

> Doris Manning
> Database Administrator
> Hargrove Inc.
> www.hargroveinc.com



More information about the AccessD mailing list