Beruflich Dokumente
Kultur Dokumente
There are two approaches that you can take to present the results in the standard time format (hours : minutes : seconds). You use the subtraction operator (-) to find the difference between times, and then do one of the following:
Apply a custom format code to the cell by doing the following: 1. Select the cell. 2. On the Home tab, in the Number group, click the arrow next to the Number Format box, and then click More Number Formats. 3. Click Custom in the Category list, and then select a custom format in the Type box. Use the TEXT function to format the times.
When you use the time format codes, hours never exceed 24, minutes never exceed 60, and seconds never exceed 60.
Example
The example may be easier to understand if you copy it to a blank worksheet. How do I copy an example? A 1 Start time End time B
2 6/9/2007 10:35 AM 6/9/2007 3:30 PM 3 Formula 4 5 6 =B2-A2 =B2-A2 =B2-A2 Description (Result) Hours between two times (4). You must manually apply the custom format "h" to the cell. Hours and minutes between two times (4:55). You must manually apply the custom format "h:mm" to the cell. Hours, minutes, and seconds between two times (4:55:00). You must manually apply the custom format "h:mm:ss" to the cell. Hours between two times with the cell formatted as "h" by using the TEXT function (4). Hours and minutes between two times with the cell formatted as "h:mm" by using the TEXT function (4:55). Hours, minutes, and seconds between two times with the cell formatted as "h:mm:ss" by using the TEXT function (4:55:00).
Note If you use both a format applied with the TEXT function and apply a number format to the cell, the TEXT function takes precedence over the cell formatting. For more information about how to use these functions, see TEXT function and Display numbers as dates or times. Top of Page
Example
The example may be easier to understand if you copy it to a blank worksheet. How do I copy an example?
A Start time End time 6/9/2007 3:30 PM Description (Result) Total hours between two times (4)
Total minutes between two times (295) The difference in the hours unit between two times. This value cannot exceed 24 (4). The difference in the minutes unit between two times. This value cannot exceed 60 (55). The difference in the seconds unit between two times. This value cannot exceed 60 (0).
For more information about how to use these functions, see INT function, HOUR function, MINUTE function, and SECOND function.