How can I truncate milliseconds to 2 most significant decimals in strftime()

后端 未结 0 765
有刺的猬
有刺的猬 2020-12-03 08:29

I have a datetime object that is printed with:

ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f").strip()
p         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题