Python 打印时间毫秒
2022-03-30 本文已影响0人
JP0001
import datetime
mytime = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
print(mytime)# 2022-03-30 02:47:52.702
import datetime
mytime = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
print(mytime)# 2022-03-30 02:47:52.702