Format |
Description |
Example |
D |
The date in the month, which contains two digits. |
01-31 |
D |
Abbreviation of day in a week |
Mon-sun |
J |
The date in the month. Do not add 0 |
1-31 |
L |
Complete weekly statement |
Sunday to Saturday |
N |
Week representation of ISO-8601 |
1 = Monday, 7 is Sunday |
S |
The prefix of the second digit every day in a month. |
St, Nd, RD or th. |
W |
Number of weeks |
0 = Sunday, 6, and so on |
Z |
The day of the year, starting from 0 |
0-364, the leap year is 365 |
W |
The number of weeks in the year in ISO-8601 format, starting from Monday |
01-53 |
F |
Complete Text representation of the month |
January to December |
M |
The two digits of the month indicate that the number is less than the previous zero. |
01-12 |
M |
Abbreviation of month |
Jan to Dec |
N |
Number of the month, not zero |
1-12 |
T |
Maximum number of days in a month |
28-31 |
L |
Is it a leap year? |
1 is a leap year, 0 is not |
O |
The year of the ISO-8601, which is the same as y, but if Week (W) is input for the previous year or the next year, replace it with that year |
1998,2004 |
Y |
4-digit year |
2008 |
Y |
2-digit year |
98,08 |
A |
Upper afternoon in lower case |
Am pm |
A |
Upper afternoon in upper case |
Am pm |
G |
12-hour system, not zero |
1-12 |
G |
In 24-hour format, no zeros |
0-23 |
H |
12-hour system, two bits, Less Than Zero |
01-12 |
H |
In 24-hour format, two bits, Less Than Zero |
00-23 |
I |
Minute, 2 bits, Less Than Zero |
00-59 |
S |
Second, 2 bits, Less Than Zero |
00-59 |
U |
Millisecond, zero in front |
001 999 |
O |
Difference to Greenwich time (GMT) in hours and minutes |
+ 1030 |
P |
Difference to Greenwich time (GMT) with colon between hours and minutes |
-08:00 |
T |
Timezone abbreviation of the machine running the code |
EST, MDT, PD |
Z |
Timezone offset in seconds (negative if west of UTC, positive if East) |
-From 43200 to 50400 |
C |
ISO 8601 date (Note: milliseconds, if present, must be specified with at least 1 digit. There is no limit to how many digits the millisecond value may contain. See http://www.w3.org/TR/NOTE-datetime for more info) |
2007-04-17t15: 19: 21 + 08: 002008-03-16t16: 18: 22z |
U |
Seconds since the Unix epoch (January 1 1970 00:00:00 GMT) |
1193432466-2138434463 |