Parameter
|
Description
|
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).
|
DAY
|
Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.
|
DY
|
Day of year (1-366).
|
DW
|
Day of week (1-7).
|
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).
|
MON
|
Displays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.
|
MONTH
|
Displays the month as a full name (January-December) using the strings given by the LongMonthNames global variable.
|
RM
|
Roman numeral month (I-XII; JAN = I).
|
YY
|
Displays the year as a two-digit number (00-99).
|
YYYY, YEAR
|
Displays the year as a four-digit number (0000-9999).
|
H, H12
|
Hour of day without a leading zero (1-12).
|
H24
|
Hour of day without a leading zero (1-24).
|
HH, HH12
|
Hour of day with a leading zero (01-12).
|
HH24
|
Hour of day with a leading zero (01-24).
|
N
|
Displays the minute without a leading zero (0-59).
|
NN
|
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).
|
AMPM
|
Uses the 12-hour clock for the preceding h or hh specifier, and displays 'AM' for any hour before noon, and 'PM' for any hour after noon.
|
Q
|
Quarter of year (1, 2, 3, 4; JAN-MAR = 1).
|
'Text', "Text"
|
Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.
|
:
|
Displays the time separator character ':'.
|
/
|
Displays the date separator character '/'.
|
,
|
Displays the character ','.
|
.
|
Displays the character '.'.
|
;
|
Displays the character ';'.
|
-
|
Displays the character '-'.
|