Reputation:
I am getting an error and not sure why, my code is as follows:
year1 = int(input('choose a year :',))
month1 = int(input('choose a month :',))
day1 = int(input('choose a day :',))
year2 = int(input('choose a year :',))
month2 = int(input('choose a month :',))
day2 = int(input('choose a day :',))
from datetime import date, timedelta as td
from datetime import strftime as st
d1 = date(year1, month1, day1)
d2 = date(year2, month2, day2)
delta = d2 - d1
for i in range(delta.days + 1):
day = st((d1 + td(days=i)))
print(get_exrates(day))
the full error code i get is:
Traceback (most recent call last):
line 17, in <module>
from datetime import strftime as st
ImportError: cannot import name 'strftime'
Upvotes: 7
Views: 10711