美文网首页python的记录
Python 打印时间毫秒

Python 打印时间毫秒

作者: JP0001 | 来源:发表于2022-03-30 10:48 被阅读0次
    import datetime
    mytime = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
    print(mytime)# 2022-03-30 02:47:52.702
    

    相关文章

      网友评论

        本文标题:Python 打印时间毫秒

        本文链接:https://www.haomeiwen.com/subject/vamijrtx.html