programming-examples/python/Date/Python program to convert unix timestamp string to readable date.py

6 lines
140 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import datetime
print(
datetime.datetime.fromtimestamp(
int("1284105682")
).strftime('%Y-%m-%d %H:%M:%S')
)