The difference between two time fields is a number so you would have to create a number type formula field. The reason is because you're showing the difference between the time which is always a number (number of hours, minutes, etc). You wouldn't be able to represent that as a time which is restricted to AM/PM specific times.
It shows you how to do it in your linked help doc (for hours):
For other units of time, just think of the conversion
- To get seconds: divide by 1000
- To get minutes: 1000ms/sec * 60sec/min = divide by 60,000
- To get hours: 1000ms/sec * 60sec/min * 60min/hr = divide by 3,600,000
To get it in a time format (hh:mm), you could make your formula a text field and do some sort of the following:
((startDate - endDate) / 60000) / 60)
& ':' &
((startDate - endDate) / 60000), 60)
You could replace ':' with markers to denote Hr and Min and you could certainly move the ((startDate - endDate) / 60000) to its own formula field to make it less harsh on the eyes. The limitation of this is whether the field will be used for sums, average, etc because this wouldn't work. I'm not aware of a way to display the difference in the format you're asking and have it be useful for sums or averages in a report (if that's a requirement). I'd typically break it into discrete units that everyone can understand to sum/average (sec, min, hours).