I believe that would work. Sorry, it's late and my mind is getting a bit
fuzzy. Here is an example; if I start on 5/19 (Saturday) and finished on
5/21, then I wouldn't count the day of 5/19, I would skip Sunday, and only
count Monday which would give me a one day delivery. See, it's impossible to
deliver on the same day of the pick up, so that day isn't counted. If I
started on Sunday then again I wouldn't count Sunday because it's the first
day and because it's Sunday for a one day delivery.
A more straight forward example; If I started on 5/21 (Monday) and finished
on 5/24 (Thursday) then I would only count Tuesday, Wednesday, and Thursday.
Yeah, I know it's a little crazy, but that's the way ot works.
Mike
"NickHK" wrote:
So you mean, Sunday is valid, only if it is the StartDate, but should be
ignored as a workday otherwise ?
NickHK
"mikebres" wrote in message
...
Well, I work for the Postal Service, and while Sunday isn't a delivery
day,
work is still being done on Sunday to get the mail delivered. We are
using
sample mail to test the internal processes to make sure they are being
followed. Sometimes we start the mail on Sunday so I need to include that
as
a possibility.
"Rick Rothstein (MVP - VB)" wrote:
Wow, that's impressive, and I learned about a new operator, the \.
If I understand it, you are using 6 days for each week up to the last
one.
Then you are looping through the last week to see if there is a Sunday
in
the
date range. Pretty slick.
Not sure about "slick", but yes, that is how the function works.
Your function gave me exactly what I asked for, but it exposed a
fallicy
in
my logic. I asked for the number of workdays thinking that would get
me
what
I needed. However, I now realize what I need is a different type of
calculation. For example if I start on 5/26 and end on 5/29 then it
took
me
2 days (not counting Sunday) to deliver the product. However if I
start
on
5/27 and end on 5/29 then it still took me 2 days since I started on
Sunday.
Does that make sense?
No, I am sorry, but it does not make sense. How can you start your job
on a
Sunday if Sunday is not a workday?
Rick