You can do it with a formula or Visual Basic.
See this post about doing an Array or Index formula to add values based on criteria:
Vlookup on more than one column?
Code:
To start with I subtracted Start time from End Time and multiplied
by 24 to get a number format from the the Start and End values formated
as Time.
If C3 is the End time and B3 the Start, this is the formula.
=(C3-B3)*24
Array Formula to Sum Column 'D':
{=SUM((D2:D7>8)*D2:D7)}
(Use Ctl+Shft+Enter to apply a formula as an Array Formula
that will add the Curly Brackets and apply the array)
A subtotal formula will total values in a filtered set of records.
Use a subtotal with a custom filter to show values greater than 8.
=SUBTOTAL(9,D2:D7)