a 'a.m.' or 'p.m.' (Note that this is slightly different than PHP's output, because this includes periods to match Associated Press style.)
A 'AM' or 'PM'.
b Month, textual, 3 letters, lowercase.
c ISO 8601 format. (Note: unlike others formatters, such as "Z", "O" or "r", the "c" formatter will not add timezone offset if value is a naive datetime (see datetime.tzinfo).
d Day of the month, 2 digits with leading zeros.
D Day of the week, textual, 3 letters.
E Month, locale specific alternative representation usually used for long date representation.
f Time, in 12-hour hours and minutes, with minutes left off if they're zero. Proprietary extension.
F Month, textual, long.
g Hour, 12-hour format without leading zeros.
G Hour, 24-hour format without leading zeros.
h Hour, 12-hour format.
H Hour, 24-hour format.
i Minutes.
j Day of the month without leading zeros.
l Day of the week, textual, long.
L Boolean for whether it's a leap year.
m Month, 2 digits with leading zeros.
M Month, textual, 3 letters.
n Month without leading zeros.
N Month abbreviation in Associated Press style. Proprietary extension.
O Difference to Greenwich time in hours.
P Time, in 12-hour hours, minutes and 'a.m.'/'p.m.', with minutes left off if they're zero and the special-case strings 'midnight' and 'noon' if appropriate. Proprietary extension.
r RFC 2822 formatted date.
s Seconds, 2 digits with leading zeros.
S English ordinal suffix for day of the month, 2 characters.
t Number of days in the given month.
T Time zone of this machine.
u Microseconds.
U Seconds since the Unix Epoch (January 1 1970 00:00:00 UTC).
w Day of the week, digits without leading zeros.
W ISO-8601 week number of year, with weeks starting on Monday.
y Year, 2 digits.
Y Year, 4 digits.
z Day of the year.
Z Time zone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.