1 from datetime import datetime 2 now = datetime.now() 3 print(now.strftime(‘%Y-%m-%d‘)) 4 print(now.strftime(‘%Y%m%d‘))
18 时间的格式化
原文:https://www.cnblogs.com/reaix/p/12670997.html