Time in Excel, whether time of day or duration is held as the decimal part of the value in the cell.
12 hours or 12noon is 0.5 which is half way through the day.
Extract the decimal part of the value. If you are calculating duration, and your duration goes beyond 24 hours then there will be whole numbers as well with 1 equivalent to 24 hours.
Just staying with values less than 24 hours:
If the time is in cell A1 use =MOD(A1,1) to get only the decimal part of the contents of A1
To get your decimal part of the hour use
Your time/duration value of 02:30:30 returns 2.508333 using the above formula.
24*A1 will work if you have durations longer than 24 hours. If cells are formatted to only show hours / minutes /seconds, there may be date information in the cell, so the Modulus approach which uses only the decimal part of the cell contents may be more robust.
All result cells need to be formatted as a number with the required number of decimal places - Excel tends to try and carry over the time format.