| Command | Example | Description |
| %% |
% |
Same as % |
| %a |
Mon |
Server's abbreviated weekday name |
| %A |
Monday |
Server's full weekday name |
| %b |
Apr |
Server's abbreviated month name |
| %B |
April |
Server's full month name |
| %c |
Mon Apr 21 05:27:15 1997 |
Server's appropriate date and time representation |
| %C |
19 |
Server's century number (the year divided by 100 and truncated to an integer) as a decimal number [00-99] |
| %d |
21 |
Day of month ( 01 - 31 ) |
| %D |
04/21/97 |
Date as %m/%d/%y |
| %e |
21 |
Day of month ( 1-31; single digits are preceded by a blank ) |
| %h |
Apr |
Server's abbreviated month name. |
| %H |
05 |
Hour ( 00 - 23 ) |
| %I |
05 |
Hour ( 01 - 12 ) |
| %j |
111 |
Day number of year ( 001 - 366 ) |
| %KC |
KC |
Server's appropriate date and time representation |
| %m |
04 |
month number ( 01 - 12 ) |
| %M |
27 |
minute ( 00 - 59 ) |
| %n |
<new line> |
Same as pressing <Return> |
| %p |
AM |
Server's equivalent of either AM or PM |
| %r |
05:27:15 AM |
Time as %I:%M:%S [AM|PM] |
| %R |
05:27 |
Time as %H:%M |
| %S |
15 |
Seconds ( 00 - 61 ), allows for leap seconds |
| %t |
<tab> |
Same as a tab |
| %T |
05:27:15 |
Time as %H:%M:%S |
| %U |
16 |
Week number of year ( 00 - 53 ), Sunday is the first day of week 1 |
| %w |
1 |
Weekday number ( 0 - 6 ), Sunday = 0 |
| %W |
16 |
Week number of year ( 00 - 53 ), Monday is the first day of week 1 |
| %x |
04/21/97 |
Server's appropriate date representation |
| %X |
05:27:15 |
Server's appropriate time representation |
| %y |
97 |
Year within century ( 00 - 99 ) |
| %Y |
1997 |
Year as ccyy ( e.g. 1986 ) |
| %Z |
PDT, EST, etc. |
Time zone name or no characters if no time zone exists |
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.