timestamp转date
import time
import datetime
a = int(round(time.time()*1000))
b = time.localtime(float(a/1000))
c = time.strftime('%Y-%m-%d', b)
d = datetime.datetime.strptime(c, '%Y-%m-%d')
print(d)
import time
import datetime
a = int(round(time.time()*1000))
b = time.localtime(float(a/1000))
c = time.strftime('%Y-%m-%d', b)
d = datetime.datetime.strptime(c, '%Y-%m-%d')
print(d)
本文标题:2019-04-08
本文链接:https://www.haomeiwen.com/subject/dmtviqtx.html
网友评论