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!

Calculating actual time depending on workshift

Status
Not open for further replies.

almaler

Programmer
Nov 24, 2003
48
US
Hello,
I am using Crystal 9.0 to report on a SQL 2000 database.
I have an open date field and a close date field. I am able to calculate the time between these two dates, but what I would like to do is this:

Say the open date is on Friday at 4pm and close date is on Monday at 8am. I only want to include the actual work hours, not the "off time". So, assuming that normal work hours are 7am to 5pm. The calculation should return 2 hours and 0 minutes. The hour from 4-5pm on Friday and the hour from 7am-8am on Monday. Does anyone have any idea how I can do this?
 
Do you have a table of work days in your database that tracks holidays, long-weekends, etc?

If not, how do you want to handle those situations?

 
Using a formula I calculated the working hours between two events. This takes into account working days and hours of work. I can post it here if people want (its quite a long formula) or you can contact me

george.allard@crystal-technical-services.co.uk

Cheers


George Allard
Crystal Reports trainer and consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top