Table 2–3: Date-format Strings and Descriptions
Date- format String
|
Description
|
CC
|
The century as a two-digit number.
|
YYYY
|
The year as a four-digit number.
|
YYY
|
The last three digits of the year.
|
YY
|
The last two digits of the year.
|
Y
|
The last digit of the year.
|
Y,YYY
|
The year as a four-digit number with a comma after the first digit.
|
Q
|
The quarter of the year as a one-digit number (with values 1, 2, 3, or 4).
|
MM
|
The month value as a two-digit number (in the range 01-12).
|
MONTH
|
The name of the month as a string of nine characters (’JANUARY’ to ’DECEMBER ’).
|
MON
|
The first three characters of the name of the month (in the range ’JAN’ to ’DEC’).
|
WW
|
The week of the year as a two-digit number (in the range 01-53).
|
W
|
The week of the month as a one-digit number (in the range 1-5).
|
DDD
|
The day of the year as a three-digit number (in the range 001-366).
|
DD
|
The day of month as a two-digit number (in the range 01-31).
|
D
|
The day of the week as a one-digit number (in the range 1-7, 1 for Sunday and 7 for Saturday).
|
DAY
|
The day of the week as a character string of nine characters (in the range ’SUNDAY’ to ’SATURDAY ’).
|
DY
|
The day of the week as a character string of three characters (in the range ’SUN’ to ’SAT’).
|
J
|
The Julian day (number of days since DEC 31, 1899) as an eight-digit number.
|
TH
|
When added to a format keyword that results in a number, this format keyword (’TH’) is replaced by the string ’ST’, ’ND’, ’RD’, or ’TH’ depending on the last digit of the number.
|