打印出当前的年月日时分秒

print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())))

2018-09-05 09:39:51

 

 

打印出当前的年月日

print(time.strftime('%Y-%m-%d',time.localtime(time.time())))

2018-09-05

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-11-28
相关资源
相似解决方案