# EXCEL
### Using Hours, Minutes and Seconds in Custom Formats
To display hours, minutes, and
seconds, include the following format codes:
**To display** |
**Use this code** |
Hours as 0-23 |
h |
Hours as 00-23 |
hh |
Minutes as 0-59 |
m |
Minutes as 00-59 |
mm |
Seconds as 0-59 |
s |
Seconds as 00-59 |
ss |
Hours as **4 AM** |
h AM/PM |
Time as **4:36 PM** |
h:mm AM/PM |
Time as **4:36:03 P** |
h:mm:ss A/P |
Elapsed time in hours, e.g. 25:02 |
[h]:mm |
Elapsed time in minutes, e.g. 63:46 |
[mm]:ss |
Elapsed time in seconds |
[ss] |
Fractions of a second |
h:mm:ss.00 |
The minutes code m or mm must appear after an hour code
(e.g. h:mm) or before a seconds code (e.g. mm:ss), otherwise Excel will
interpret it as a month code. The example below shows a time format which
will display the time as 12.30 PM.
**Click here to
return to the Excel index.**
webmaster@allaboutoffice.co.uk |