python--时间戳

1、datetime

import datetime
print(datetime.datetime.now())

  

 2、time

import time
otherStyleTime = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime())
print(otherStyleTime)

  

猜你喜欢

转载自www.cnblogs.com/lutt/p/12320775.html
今日推荐