Microsoft Office Tutorials and References
In Depth Information
Creating your own date and time formats
Second without leading zero and tenths of a second with leading zero.
Second and hundredths of a second with leading zero.
Time in AM/PM notation.
Time in am/pm notation.
Time in A/P notation.
Time in a/p notation.
Brackets display the absolute elapsed time when used to enclose a time code,
as in [h] . You can use brackets only around the first component of the code.
After you add a custom date or time format to the Type list, you can apply it to any date
or time entry. Select the Custom category, select the format you entered from the Type list
(new custom formats appear at the bottom of the list), and click OK to apply the format.
Measuring elapsed time
You can enclose time codes in brackets, as listed at the bottom of Table 15-1, to display
more than 24 hours, more than 60 minutes, or more than 60 seconds in a time value. The
brackets must always appear around the first code in the format. Excel provides one built-in
elapsed-time code, [h]:mm:ss, in the Custom category Type list. Other valid codes for
measuring elapsed time include [mm]:ss and [ss].
Bracketed codes have no effect if you use them in any position of the format other than
first. For example, if you use the code h:[mm]:ss, Excel ignores the brackets and displays the
time using the regular h:mm:ss format.
One format in the Time category on the Number tab in the Format Cells dialog box
represents elapsed time: 37:30:55. This is the same as the [h]:mm:ss format in the
Suppose you want to determine the elapsed time between two dates. Type the following
values into cells A1 and A2, respectively: