Sorry the below is so off topic, I posted it to a PHP/MySQL forum and have not gotten a response and was hoping some one here could point me to a resource.  The manager that is asking for this says M$ Excel can do what he is asking, I have my doubts that is can. 
<br><br>----<br>I have a request to produce a report for server availability for
business hours only, M-F 8AM-5PM. I have an example table below that
houses all the data but am having trouble understanding how to extract
the data.
<br>
<br>
The table looks something like:
<br>
<br>
id   startDate     startTime     endDate     endTime
<br>
1    2007-03-01     06:00:00     2007-05-01  17:00:00
<br>
2    2007-04-16     09:30:00     2007-04-16  13:00:00
<br>
3    2007-05-23     00:00:00     2007-05-26  19:00:00
<br>
....
<br>
<br>
id represents a system
<br>
<br>
system 1 was down for a total of 198 hours between 3/01 - 3/31.  22 workdays * 9 hours a day
<br>
<br>
system 2 was down for a total of 3.5 hours
<br>
<br>
system 3 was down for 24 hours
<br>
<br>I can do it by hand, how do I do it using SQL/PHP? What if I wanted
a report that showed downtime for April? system one would have a down
time figure of 189 hours + systems 2 downtime of 3.5 hours. (567
workhours - 189 hours down for system 1 - 3.5 hours for system 2) / 567
* 100 = % system were available.
<br>
<br>Please tell me there is an easy way to calculate the hours of
downtime? And in that vain the number of working hours in a given month.<br clear="all"><br>-- <br>Jamie Bohr