timdelta get just time code example
Example 1: convert float in datetime python
from datetime import datetime
datetime.fromtimestamp(*your_timestamp_here*)#.strftime('%Y-%m-%d') to convert to a formated string
Example 2: 1 day ago python datetime
date_N_days_ago = datetime.now() - timedelta(days=N)