Thanks, Albert.
I'm only going to need to stick to a more simplistic calulation for now but I'm sure things will be changing in this app sooner or later.  The specs are a moving target.  If you don't mind I'll save this e-mail and I might be contacting you in the future to ask for your expertise.
Thanks for responding
Bob Castanaro
Barberton Citizens Hospital


Albert Berry <[EMAIL PROTECTED]>
Sent by: [email protected]

05/11/2005 11:57 AM

Please respond to
[email protected]

To
[email protected] (RBG7-L Mailing List)
cc
Subject
[RBG7-L] - Re: Date Calculations





I also have an application that counts daya. It uses three tables, one of which is maintained to
be always two years in advance (technically, 730 days) when starting the main application, and
consists of every calendar day. The second table sets the working hours for each of the calendar
days (reduced Saturday hours, but every day can have a specified shift length). The third table is
a list of dates with hours that is used to create holidays - although one could increase the
working hours on a specific date if desired.

--- [EMAIL PROTECTED] wrote:
> I have an application that counts "working days" between two dates and does not include weekends
> or holidays.  You have to maintain a holiday table (as this can change from year to year and
> company to company) but you do not have to keep any other tables for weekends.
>
> It is somewhat complex but runs great and I do not have any problems with it.  You do not have
> to maintain it for different years, even leap year.
>
> I believe Mr. Lustig posted a single equation also, but I was not able to get it to work.  I did
> not spend any time on it and it most likely was some error of mine.  Since mine takes about 20
> lines of code, if you can get his to work, it would certainly be nice.  Let me know if you want
> me to send you the code.
>
> -Bob
>
> -------------- Original message --------------
>
> Hi all,
> I remember there was quite a lot of discussion recently on calculating dates (like counting
> days), and the methodology for taking into account weekends and holidays.
> Can someone point me to those discussion archives?  I need to count days from one date to
> another, and make sure that I do not count weekends and holidays in the mix.  I suspect there
> will be an extra table or two to update every year based on holidays, but I am not even sure
> where to begin.
> For example:
> Patient off work 1.2.2005
> Returned to work 3.1.2005
> How many days between the two less weekends and holidays.
> Thanks
> Bob C.

Albert Berry
Management Consultant
RR2 - 1252 Ponderosa Drive
Sparwood BC, V0B 2G2
Canada
(250) 425-5806
(250) 425-7259
(708) 575-3952 (fax)
[EMAIL PROTECTED]


Reply via email to