본문으로 바로가기

python yyyy-mm-ddThh:mm:ss

category Language/Python 2018.05.02 18:01

python yyyy-mm-ddThh:mm:ss


1
2
3
4
5
6
7
import datetime
now = datetime.datetime.now()
print(now)
 
format_iso_now = now.isoformat()
 
print(format_iso_now)
cs


result

2018-05-02 18:00:18.490057

2018-05-02T18:00:18.490057 


end.




댓글을 달아 주세요