dt = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
dt_ms = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f') # 含微秒的日期时间,来源 比特量化
print(dt)
print(dt_ms)
返回
2018-09-06 21:54:46 2018-09-06 21:54:46.205213
最后修改于 2020-03-15 21:45:30
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付

