Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Business Hours Calculation 1

Status
Not open for further replies.

George99

Programmer
Mar 26, 2001
13
GB
I am trying to calculate business hours between two date/time fields. I downloaded the Seagate UFL cruflwdays.dll - this allowed the std computation. It even had provision for holidays.

BUT - I have two sets of working hours in a week.

Mon-Fri are 09:00 - 18:00
Sat is 10:00 - 13:00

The only way I can get close to the answer is to do the calc twice. Once, assuming the working week is Mon-Fri and the second assuming the working week is Saturday only. I think my problems occur when a job starts and/or finishes on a Saturday.

Any advice on this gratefully accepted.


Thanks

George
 
In the general forum there is a FAQ I wrote on common formulas. One of them does business days between two dates. This formula might help you because you can modify the logic for your situation. You can try this and see if it helps.
Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
How do you get the Seagate UFL cruflwdays.dll? I was also trying to calculate business hours between two dates/times.
 
Craig: I found the info thru the Seagate (now crystaldecisions) knowledgebase.

There are only 4 files with a very clear readme.txt

If you can't find it e-mail me and I will send you the files

George


George Allard
Crystal Reports Consultant and Trainer
georgea.cts@dial.pipex.com
 
Thanks George, I found the 4 files on their web site. But, it looks like it's only for calculating the number of working days between two dates. I was looking for something to calculate the number of business hours between two date / times. Have you seen anything like this?

Thanks,

Craig
 
Thanks George, I found the 4 files on their web site.

Craig
 
I read the documentation and found the part on how to do hours. Thanks again.

Craig
 
Hello,

If i use Ken hamady's formulae. He says that you need to manually input all the holiday and non business dates.

For weekend dates can i use a loop?

i.e specify the first weekend and then just add 7 days?

Cheers

p.s. using CR 10 now.

Rob
 
You could successfully do that, although you could handle weekends without having to make a loop.

Ken actually handles weekends in the same formula on his website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top