python datetime the day before code example
Example 1: python today - 1 day
from datetime import datetime, timedelta
yesterday = datetime.today() - timedelta(days = 1 )
Example 2: python timestamp shift one day
from datetime import datetime, timedelta
print datetime.now() + timedelta(days=5, hours=-5)