티스토리 뷰

Python

DATE AND TIME

뚜비콩 2017. 9. 8. 10:00

Datetime

from datetime import datetime

now = datetime.now()
print now


Extracting Information

from datetime import datetime
now = datetime.now()

print '%s/%s/%s %s:%s:%s' % (now.month, now.day, now.year, now.hour, now.minute, now.second)





'Python' 카테고리의 다른 글

Strings and Console Output  (0) 2017.09.07
댓글