1from datetime import datetime
2
3timestamp = 1586507536367
4dt_object = datetime.fromtimestamp(timestamp)
5
1import time
2timestamp = 1547281745
3datetime = time.strftime('%A, %Y-%m-%d %H:%M:%S', time.localtime(timestamp))
4print(datetime)
1
2from datetime import datetime
3
4timestamp = 1545730073
5dt_object = datetime.fromtimestamp(timestamp)
6
7print("dt_object =", dt_object)
8print("type(dt_object) =", type(dt_object))
9