In Python we can create a date from a Unix timestamp.
We can use the fromtimestamp()
method of the datetime
module:
from datetime import datetime
def timestamp_to_date_format(ts_unix):
dt_format = '%Y-%m-%d'
return datetime.fromtimestamp(ts_unix).strftime(dt_format)