Microsoft Office Tutorials and References
In Depth Information
Parts of a number format string
Table 16-2 describes the codes used to create custom formats for dates and times.
Table 16-2: Codes Used in Creating Custom Formats for Dates and Times
Code
What It Displays
M
The month as a number without leading zeros (1–12)
mm
The month as a number with leading zeros (01–12)
mmm
The month as an abbreviation (Jan–Dec)
mmmm
The month as a full name (January–December)
mmmmm
The first letter of the month (J–D)
d
The day as a number without leading zeros (1–31)
dd
The day as a number with leading zeros (01–31)
ddd
The day as an abbreviation (Sun–Sat)
dddd
The day as a full name (Sunday–Saturday)
yy or yyyy
The year as a two-digit number (00–99) or as a four-digit number (1900–9999)
h or hh
The hour as a number without leading zeros (0–23) or as a number with leading zeros
(00–23)
m or mm
The minute as a number without leading zeros (0–59) or as a number with leading zeros
(00–59)
s or ss
The second as a number without leading zeros (0–59) or as a number with leading zeros
(00–59)
[ ]
Hours greater than 24 or minutes or seconds greater than 60
AM/PM
The hour using a 12-hour clock or no AM/PM indicator if the hour uses a 24-hour clock
Search JabSto ::




Custom Search