Coding/Python 삽질기2017. 7. 8. 01:19

날짜 시간 출력 하기



  1. 날짜 시간 출력 하기



import datetime


today = datetime.datetime.now()

print today

print today.strftime("%Y.%m.%d")

print today.strftime("%Y.%m.%d %H:%M:%S")



2017-07-08 01:07:53.874000

2017.07.08

2017.07.08 01:07:53



'Coding > Python 삽질기' 카테고리의 다른 글

Python으로 만든 File manager  (0) 2017.08.20
[Python] Sleep  (0) 2017.07.08
[Python] Thread example  (0) 2017.06.30
Posted by chobocho