--
Format | --Description | --
---|---|
%a | The abbreviated weekday name according to the current locale |
%A | the full weekday name according to the current locale |
%b | The abbreviated month name according to the current locale |
%B | The full month name according to the current locale |
%d | The day of the month as a decimal number (range 01 to 31) |
%e | The day of the month as a decimal number (range 1 to 31) |
%F | Equivalent to %Y-%m-%d (the ISO 8601 date format) |
%H | The hour as a decimal number using a 24-hour clock (range 00 to 23) |
%I | The hour as a decimal number using a 12-hour clock (range 01 to 12) |
%k | The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank |
%l | The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank |
%m | The month as a decimal number (range 01 to 12) |
%M | The minute as a decimal number (range 00 to 59) |
%p | Either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale. Noon is treated as "PM" and midnight as "AM". |
%P | Like %p but lowercase: "am" or "pm" or a corresponding string for the current locale |
%r | The time in a.m. or p.m. notation |
%R | The time in 24-hour notation (%H:%M) |
%S | The second as a decimal number (range 00 to 60) |
%T | The time in 24-hour notation with seconds (%H:%M:%S) |
%y | The year as a decimal number without the century |
%Y | The year as a decimal number including the century |
%% | A literal % character |