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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating time differences... with a twist

Status
Not open for further replies.

bosun

Technical User
Feb 14, 2002
20
US
I have to calculate system down time for a helpdesk application that I am designing. The down time will be the number of business hours between when the system went down and when service was restored.

I have the following information to start with:
DateSysDn
TimeSysDn
DateSysUp
TimeSysUp

Business hours are: M-F 07:00 - 19:00 Sat 07:30 - 17:00

I know I will have to create a function to do this, but I am a little lost at the moment.
 
I have done something similar and have some code, which comes in several functions, if you get nothing better I can e-mail to you if you let me know your address. I had to take into account Public Holidays. I also had a problem which was impossible(in that I didn't have time to create the code) to solve in that people would insist on closing jobs outside normal working hours. This meant the reported working hours were less than the actual. What I would have liked to have done would be to report "outside normal hours" Sandy
 
That would be great. My address is bill.lyle@monro.com

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top