Format Code |
Value |
%% |
a single percent character |
%a |
abbreviated weekday name (e.g. Wed) |
%A |
full weekday name (e.g. Wednesday) |
%b |
abbreviated month name (e.g. Jun) |
%B |
full month name (e.g. June) |
%c |
locale's default date and time representation |
%d |
day of month (0131) |
%H |
hour (24-hour clock) (0023) |
%I |
hour (12-hour clock) (0112) |
%j |
day number of year (001366) |
%m |
month number (0112) |
%M |
minute (0059) |
%p |
AM or PM flag |
%S |
seconds (0059) |
%<digit>u |
fractional seconds with <digit> precision |
%U |
week number of the year (0053), with the first Sunday as the first day of week one |
%w |
weekday as a decimal number (06), with 0 representing Sunday |
%W |
week number of the year (0053), with the first Monday as the first day of week one |
%x |
locale's date representation |
%X |
locale's time representation |
%y |
year within century (0099) |
%Y |
year, including the century (for example, 1997) |
%Z |
time zone name or abbreviation, depending on the operating system locale settings |