Microsoft Office Tutorials and References
In Depth Information
Creating your own date and time formats
Highlight the entry in the text box at the top of the Type list, and type the following
custom format code: dddd mmmm dd, yyyy h:mm:ss.0
5. Click OK. Excel stores the new format in the Type list for the Custom category and
displays the date using the new format in the selected cell.
You can use the same procedure to display only a portion of the date or the time
information available. For example, if you create the format mmmm , Excel displays the date
2/24/2014 as simply February .
Table 15-1 shows the formatting codes you can use to create custom date and time
formats. Be sure to keep two facts in mind. First, Excel assumes that m means months, but if
you type the code m immediately after an h , or the code mm immediately after an hh ,
Excel displays minutes instead of months. Second, if you include one of the codes AM/PM,
am/pm, A/P, or a/p in a time format, Excel uses the 12-hour time convention; if you omit
these codes, Excel uses the 24-hour (military) time convention.
TABLE 15-1 Codes for creating custom date and time formats
Number in General (serial value) format.
Day number without leading zero (1–31).
Day number with leading zero (01–31).
Day-of-week abbreviation (Sun–Sat).
Complete day-of-week name (Sunday–Saturday).
Month number without leading zero (1–12).
Month number with leading zero (01–12).
Month name abbreviation (Jan–Dec).
Complete month name (January–December).
Last two digits of year number (00–99).
Complete four-digit year number (1900–2078).
Hour without leading zero (0–23).
Hour with leading zero (00–23).
Minute without leading zero (0–59).
Minute with leading zero (00–59).
Second without leading zero (0–59).
Second with leading zero (00–59).
Second and tenths of a second without leading zero.
Second without leading zero and hundredths of a second without leading