python时间 十位时间戳 时间格式化

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38570967/article/details/82664309
import time, datetime


#十位时间戳
print(int(time.time()))
print(datetime.datetime.today())
#YYYY-MM-DD格式的时间
print(datetime.datetime.today().strftime('%Y-%m-%d'))

猜你喜欢

转载自blog.csdn.net/weixin_38570967/article/details/82664309