1from datetime import datetime
2
3timestamp = 1545730073
4dt_object = datetime.fromtimestamp(timestamp)
5
6print("dt_object =", dt_object)
7print("type(dt_object) =", type(dt_object))
8
1from datetime import date
2f_date = date(2014, 7, 2)
3l_date = date(2014, 7, 11)
4delta = l_date - f_date
5print(delta.days)
6
7