“Коды формата Python Strpt -Time” Ответ

Strptime Python



import datetime
d =datetime.datetime.strptime("01/27/2012","%m/%d/%Y").strftime('%m/%d/%Y')
print d
01/27/2012
launchable 720

Коды формата Python Strpt -Time

%a	Weekday as Sun, Mon
%A	Weekday as full name as Sunday, Monday
%w	Weekday as decimal no as 0,1,2...
%d	Day of month as 01,02
%b	Months as Jan, Feb
%B	Months as January, February
%m	Months as 01,02
%y	Year without century as 11,12,13
%Y	Year with century 2011,2012
%H	24 Hours clock from 00 to 23
%I	12 Hours clock from 01 to 12
%p	AM, PM
%M	Minutes from 00 to 59
%S	Seconds from 00 to 59
%f	Microseconds 6 decimal numbers
Vast Vulture

Ответы похожие на “Коды формата Python Strpt -Time”

Вопросы похожие на “Коды формата Python Strpt -Time”

Больше похожих ответов на “Коды формата Python Strpt -Time” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования