I get the entry date in the format "2020-12-23", type - string. I have to compare it to the current date and run the if/else condition.
code.py
curent_date = datetime.date.today()
csv_date = datetime.datetime.strptime(value, "%Y-%m-%d").date()
print(csv_date, type(csv_date))
print(curent_date, type(curent_date))
if csv_date > curent_date:
date_error.append
get me
2029-12-24 <class 'datetime.date'>
2020-04-04 <class 'datetime.date'>
But after I get 500 error
Exception Value: time data '' does not match format '%Y-%m-%d'
What's the problem?