background processing comparing date python code example
Example 1: python timestamp shift one day
from datetime import datetime, timedelta
print datetime.now() + timedelta(days=5, hours=-5)
Example 2: python: calculate number of days from today date in a data frame
df[['A','B']] = df[['A','B']].apply(pd.to_datetime) # If conversion required
df['C'] = (df['B'] - df['A']).dt.days