Sorry, I can't remember my memory. I have been using it for so long. I will record it here and try it later.
| Directive |
Meaning |
Notes |
| % |
Locale's abbreviated weekdayname. |
|
| % |
Locale's full weekday name. |
|
| % B |
Locale's abbreviated monthname. |
|
| % B |
Locale's full month name. |
|
| % C |
Locale's appropriate date andtime representation. |
|
| % D |
Day of the month as a decimalnumber [01,31]. |
|
| % F |
Microsecond as a decimalnumber [0, 999999], zero-paddedon the left |
(1) |
| % H |
Hour (24-hour clock) as adecimal number [00,23]. |
|
| % I |
Hour (12-hour clock) as adecimal number [01,12]. |
|
| % J |
Day of the year as a decimalnumber [001,366]. |
|
| % M |
Month as a decimal number [01,12]. |
|
| % M |
Minute as a decimal number []. |
|
| % P |
Locale's equivalent of eitheram or PM. |
(2) |
| % S |
Second as a decimal number []. |
(3) |
| % U |
Week number Of The Year (Sunday as the first day ofthe week) as a decimal number []. All days in a newyear preceding the firstsunday are considered to be inweek 0. |
(4) |
| % W |
Weekday as a decimal number [0 (Sunday), 6]. |
|
| % W |
Week number Of The Year (Monday as the first day ofthe week) as a decimal number []. All days in a newyear preceding the firstmonday are considered to be inweek 0. |
(4) |
| % X |
Locale's appropriate daterepresentation. |
|
| % X |
Locale's appropriate timerepresentation. |
|
| % Y |
Year without century as adecimal number []. |
|
| % Y |
Year with century as a decimalnumber. |
|
| % Z |
UTC offset in the form + hhmmor-hhmm (empty string if thethe object is naive ). |
(5) |
| % Z |
Time zone name (empty stringif the object is naive ). |
|
| % |
A literal'%'Character. |
|
Http://docs.python.org/library/datetime.html#strftime-strptime-behavior