I have a list with date, I want to substract 5 years from it.
I have tried the below code but it's not working.
import datetime
from dateutil.relativedelta import relativedelta
s = ["2018-06-19"]
print(datetime.datetime.strptime(s[0], '%Y-%m-%d').strftime('%Y-%m-%d')-relativedelta(years=5))
What am i doing wrong?