Date math again...
Kenneth Brody
kenbrody at bestweb.net
Wed Jan 4 15:58:04 PST 2006
Quoting John Esak (Wed, 4 Jan 2006 18:23:35 -0500):
[...]
> Ken's... I put in my "keep" folder and will be thinking about it still
> when ever I go back to find it again. :-) I hear 7x + y and think,
> uh-oh, quadratic equations again! :-) No, seriously, another great
> idea.
Actually, it's simple algebra, with "7x + y" representing "x weeks plus
y days".
> Unfortunately, everyone is right about the holidays. Just put them in t
> lookup file and check if any of the lookup file "dates" fall between or
> equal to the start date and end date. Checking a hard coded array or
> variable list would be clumsy and slower I think then one quick
> lookup...
If you take my method of calculating the number of weekdays, and then
add a lookup "-ng" and a getnext loop to find all the holidays in the
date range (subtracting 1 for each non-weekend one found) then you'll
get the number of non-holiday weekdays.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list