Aspect | Parameter Description | Example |
Century | CC | Two-digit century. |
21 | Century | SCC |
Two-digit century with a negative sign (C) for B.C. | -10 | Quarter |
Q | One-digit quarter of the year. | 1 |
Year | YYYY | All four digits of the year. |
2006 | Year | IYYY |
All four digits of the ISO year. | 2006 | Year |
RRRR | All four digits of the rounded year, which depends on the current year. | 2006 |
Year | SYYYY | All four digits of the year with a negative sign (C) for B.C. |
C1001 | Year | Y,YYY |
All four digits of the year with a comma. | 2,006 | Year |
YYY | Last three digits of the year. | 006 |
Year | IYY | Last three digits of the ISO year. |
006 | Year | YY |
Last two digits of the year. | 06 | Year |
IY | Last two digits of the ISO year. 06 | Year |
RR | Last two digits of the rounded year, which depends on the current year. | 06 |
Year | Y | Last digit of the year. |
6 | Year | I |
Last digit of the ISO year. | 6 | Year |
YEAR | Name of the year in uppercase. | TWO THOUSAND-SIX |
Year | Year | Name of the year with the first letter in uppercase. |
Two Thousand-Six | Month | MM |
Two-digit month of the year. | 01 | Month |
MONTH | Full name of the month in uppercase, right-padded with spaces to a total length of nine characters. | JANUARY |
Month | Month | Full name of the month with first letter in uppercase, right-padded with spaces to a total length of nine characters. |
January | Month | MON |
First three letters of the name of the month in uppercase. | JAN | Month |
Mon | First three letters of the name of the month with the first letter in uppercase. | Jan |
Month | RM | Roman numeral month. |
The Roman numeral month for the fourth month (April) is IV. | Week | WW |
Two-digit week of the year. | 02 | Week |
IW | Two-digit ISO week of the year. | 02 |
Week | W | One-digit week of the month. |
2 | Day | DDD |
Three-digit day of the year. | 103 | Day |
DD | Two-digit day of the month. | 31 |
Day | D | One-digit day of the week. |
5 | Day | DAY |
Full name of the day in uppercase. | SATURDAY | Day |
Day | Full name of the day with the first letter in uppercase. | Saturday |
Day | DY | First three letters of the name of the day in uppercase. |
SAT | Day | Dy |
First three letters of the name of the day with the first letter in uppercase. | Sat | Day |
J | Julian day-the number of days that have passed since January 1, 4713 B.C. | 2439892 |
Hour | HH24 | Two-digit hour in 24-hour format. |
23 | Hour | HH |
Two-digit hour in 12-hour format. | 11 | Minute |
MI | Two-digit minute. | 57 |
Second | SS | Two-digit second. |
45 | Second | FF[1..9] |
Fractional seconds with an optional number of digits to the right of the decimal point. Only applies timestamps,When dealing with 0.123456789 seconds, FF3 would round to 0.123. | Second | SSSSS |
Number of seconds past 12 a.m. | 46748 | Second |
MS | Millisecond (millionths of a second). | 100 |
Second | CS | Centisecond (hundredths of a second). |
10 | Separators | -/,.;: "text" |
Characters that allow you to separate the aspects of a date and time. You can supply freeform text in quotes as a separator. | When dealing with the date December 13, 1969, DD-MM-YYYY would produce 12-13-1969 and DD/MM/YYYY would produce 12/13/1969 | Suffixes |
AM or PM | AM or PM as appropriate. | AM |
Suffixes | A.M. or P.M. | A.M. or P.M. as appropriate. |
P.M. | Suffixes | AD or BC |
AD or BC as appropriate. | AD | Suffixes |
A.D. or B.C. | A.D. or B.C. as appropriate. | B.C. |
Suffixes | TH | Suffix to a number. You can make the suffix uppercase by specifying the numeric format in uppercase and vice versa for lowercase.When dealing with a day number of 28, ddTH would produce 28th and DDTH would produce 28TH |
Suffixes | SP | Number is spelled out.When dealing with a day number of 28, DDSP would produce TWENTY-EIGHT and ddSP would produce twenty-eight |
Suffixes | SPTH | Combination of TH and SP.When dealing with a day number of 28, DDSPTH would produce TWENTY-EIGHTH and ddSPTH would produce twenty-eighth |
Era | EE | Full era name for Japanese Imperial, ROC Official, and Thai Buddha calendars. |
No example | Era | E |
Abbreviated era name. | No example | Time zones |
TZH | Time zone hour. | 12 |
Time zones | TZM | Time zone minute. |
30 | Time zones | TZR |
Time zone region. | PST | Time zones |
TZD | Time zone with daylight savings information. | No example |