Format Codes for the Time Format String

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 (01–31)
%H hour (24-hour clock) (00–23)
%I hour (12-hour clock) (01–12)
%j day number of year (001–366)
%m month number (01–12)
%M minute (00–59)
%p AM or PM flag
%S seconds (00–59)
%<digit>u fractional seconds with <digit> precision
%U week number of the year (00–53), with the first Sunday as the first day of week one
%w weekday as a decimal number (0–6), with 0 representing Sunday
%W week number of the year (00–53), 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 (00–99)
%Y year, including the century (for example, 1997)
%Z time zone name or abbreviation, depending on the operating system locale settings