From: Andy on 17 Nov 2009 08:50
From: vanderghast on 17 Nov 2009 10:17 You can subtract the number of Saturday and Sunday from the total number of days between the two dates. If starting and ending are not a Saturday, then DateDiff("ww", starting, ending, vbSaturday) returns the number of Saturday between the two dates. Even if the limits are a Saturday, or a Sunday, the formula MAY work. As example: ? DateDiff("d", "7 nov 2009", "14 nov 2009")- DateDiff("ww", "7 nov 2009", "14 nov 2009", vbSaturday) - DateDiff("ww", "7 nov 2009", "14 nov 2009", vbSunday) 5 If you also have to take count of other holidays, better to place these local holidays in a table and use a DCOUNT on that table for dates between your two limits. Be sure to not subtract the same date twice (an holiday falling on a saturday, as example). Vanderghast, Access MVP "Andy" <Andy(a)discussions.microsoft.com> wrote in message news:79F75BE4-4038-47A4-B858-58A04A0807AF(a)microsoft.com... >
|
Pages: 1 Prev: Type mismatch in JOIN expression. (Error 3615) Join data stored a Next: Can't insert record |