0

I have posix times, e.g. 1572015698537 and want to convert into a human readable string format. I tried

import datetime

s = 1572015698537 / 1000.0

print(datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S.%f'))

but this just displays

2019-10-25 17:01:38.000000

and hides the milliseconds. Can someone help?

CD86
  • 979
  • 10
  • 27

0 Answers0