Format Specifiers
|
It is recommended you only use the following format specifiers when specifying date and time formats. Using anything else may produce unusual results.
|
|
|
Date Specifiers
|
|
|
|
d
|
Displays the day as a number without a leading zero (1-31).
|
dd
|
Displays the day as a number with a leading zero (01-31).
|
ddd
|
Displays the day as an abbreviation (Sun-Sat).
|
dddd
|
Displays the day as a full name (Sunday-Saturday).
|
m
|
Displays the month as a number without a leading zero (1-12).
|
mm
|
Displays the month as a number with a leading zero (01-12).
|
mmm
|
Displays the month as an abbreviation (Jan-Dec).
|
mmmm
|
Displays the month as a full name (January-December).
|
yy
|
Displays the year as a two-digit number (00-99).
|
yyyy
|
Displays the year as a four-digit number (0000-9999).
|
/
|
Date separator.
|
|
|
Time Specifiers
|
|
|
|
h
|
Displays the hour without a leading zero (0-23).
|
hh
|
Displays the hour with a leading zero (00-23).
|
m
|
Displays the minute without a leading zero (0-59).
|
mm
|
Displays the minute with a leading zero (00-59).
|
s
|
Displays the second without a leading zero (0-59).
|
ss
|
Displays the second with a leading zero (00-59).
|
am/pm
|
Displays the time in 12 hour format with an am or pm.
|
:
|
Time separator.
|