FORMAT |
VALUE |
EXAMPLE |
%a |
Day of the week abbreviation |
Sun |
%A |
Day of the week |
Sunday |
%b |
Month name abbreviation (see %h) |
Jan |
%B |
Month name |
January |
%d |
Date |
01 |
%D |
Date as "%m/%d/%y" |
06/23/95 |
%e |
Date |
1 (and not 01) |
%H |
24-hour clock hour |
13 |
%I |
12-hour clock hour |
1 |
%j |
Decimal day of the year |
360 |
%m |
Month number |
11 |
%M |
Minutes |
08 |
%p |
am | pm |
a.m. |
%r |
Time as "%I:%M:%S AM | PM" |
07:17:39 PM |
%S |
Seconds |
09 |
%T |
24-hour time as "%H:%M:%S" |
16:55:15 |
%U |
Week of the year (also %W) |
49 |
%w |
Day of the week number |
05 |
%y |
Year of the century |
95 |
%Y |
Year |
1995 |
%Z |
Time zone |
EST |