Command | Example | Description |
%a |
Mon |
Server's abbreviated weekday name |
%A |
Monday |
Server's full weekday name |
%w |
1 |
Weekday number ( 0 - 6 ), Sunday = 0 |
%d |
21 |
Day of month ( 01 - 31 ) |
%e |
21 |
Day of month ( 1-31; single digits are preceded by a blank ) |
%b |
Apr |
Server's abbreviated month name |
%B |
April |
Server's full month name |
%m |
04 |
Month number ( 01 - 12 ) |
%y |
97 |
Year within century ( 00 - 99 ) |
%C |
19 |
Server's century number (the year divided by 100 and truncated to an integer) as a decimal number [00-99] |
%Y |
1997 |
Year as ccyy ( e.g. 1986 ) |
%j |
111 |
Day number of year ( 001 - 366 ) |
%U |
16 |
Week number of year ( 00 - 53 ), Sunday is the first day of week 1
The difference between %U and %W lies in which day is counted as the first of the week. Week number 01 is the first week in January starting with a Sunday for %U or a Monday for %W. Week number 00 contains those days before the first Sunday or Monday in January for %U and %W, respectively. |
%W |
16 |
Week number of year ( 00 - 53 ), Monday is the first day of week 1 |