1from datetime import date, timedelta
2dt = date.today() - timedelta(5)
3print('Current Date :',date.today())
4print('5 days before Current Date :',dt)
5
6
1a_date = datetime.date(2015, 10, 10)
2days = datetime.timedelta(5)
3
4new_date = a_date - days
5#Subtract 5 days from a_date
6
7
8print(new_date)
9#OUTPUT
10#2015-10-05
1df_test['Difference'] = (df_test['First_Date'] - df_test['Second Date']).dt.days