Answers for "13 digit timestamp python"

0

13 digit timestamp python

import datetime

timestamp = "1523126888080"
your_dt = datetime.datetime.fromtimestamp(int(timestamp)/1000)  # using the local timezone
print(your_dt.strftime("%Y-%m-%d %H:%M:%S"))  # 2018-04-07 20:48:08, YMMV
Posted by: Guest on August-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language