If you have the times you want to calculate as text (e.g., in text input controls), then you will need to convert them to time, using the TimeValue function. If you have two time values, you can subtract them, and you will have the result in milliseconds:

You can also convert the result to have the result in any of the units you want. For the difference in seconds:

Or in minutes:

Or in hours, as I believe your example requires:

Based on the example in your question, if you want to display that difference with less decimal places, you can use the Text function to format that number as needed:

Notice that if one of the values is not valid you may end up with an invalid difference, like in the example below

To prevent that you may want to consider using a control that restricts the values that the user can enter, such as dropdown boxes.