I want to calculate the number of days till today from this list.
dateslist = [datetime.date(2014, 11, 5), datetime.date(2014, 11, 5), datetime.date(2014, 11, 17), datetime.date(2014, 11, 5)]
Edit: This question was marked duplicate. But I wanted to calculate the number of days, not the time.
I was able to solve this one. Here is the code for reference.
no_of_days = []
for a in dateslist:
no_of_days.append((datetime.date(2019,1,12) - a).days)