I am trying to write a part of my database and am a bit stuck. I have used the NetWorkhours() Function available on the web for calculating working hours for Service Level Agreements in my database. Basically faults have an open date\time and a shut date\time.
Each fault has an SLA (Service Level Agrrement) for example a password Lockout has a SLA of 1 hour. A Server Virus has an SLA of 90 "Working" Hours, (10 Days in a 9 hour day).
The NetWorkhours() Function calculates how many "Working" Hours there are between the two Date\Times.
This works absoloutley fine BUT (I say with a look of desperation), I need to be able to place the faults on hold when they are being dealt with by external agencies......
For example:
A User rings and raises a fault with an SLA of 5 hours...
The fault is raised on Friday at 0900. This gives me until 1300 to complete the job....
At 1000 I pass the fault to an external agency for rectification...
The fault is still open BUT, the time does not come out of my SLA. If they pass the job back to me at 1300 on the Monday. I need to take the job off "Hold" and the SLA will continue to count down.
This is not too much of a problem, BUT the job may be placed "On Hold" and Taken "Off Hold" more then once, in certain circumstances up to 4 times.
I have a Sub Table Which tracks comments on the fault, by linking through the 'id' field of the Faults to 'FaulId' on the sub table.
For example:
Fault 1 "Account Lockout"
-----Comment 1 "Stupid User"
-----Comment 2 "Stupid Admin"
etc.
This Table can be used to store vales such as
----- "Date\Time","On Hold"
----- "Date\Time","Off Hold"
----- "Date\Time","Rang User Left Message"
----- "Date\Time","On Hold"
----- "Date\Time","Off Hold"
----- "Date\Time","Fault Fixed and Closed"
From Here how would I be able to calculate time differences between the first time the fault goes "On Hold" and "Off Hold", then the second, third and fourth etc.
With these values I could then subtract them from the total working hours.
As you can see, I know what I would like to do but really am struggling with how to implement it.
If anyone has any idea's or links It would be much appreciated.
Thank You
Keith
Last edited: