I am have a problem that I need help with, I have the following python script and trying figure pass values to datetime.date.
EXPIRE_DATE = ("{}, {}, {}" .format(YEAR,MONTH_NUMBER,DAY)).strip()
This returns 2023, 6, 14
Now, I want to pass "EXPIRE_DATE" to datetime.date. But, I am getting an error:
today = datetime.date.today()
someday = datetime.date(EXPIRE_DATE)
Error:
TypeError: an integer is required
2023, 6, 14(result of"{}, {}, {}" .format) is a string.date()to take just the date portion, or third party libraries like the excellentdateutil) but since you appear to have integers to start with they shouldn't be necessary. Or areYEARetc themselves strings?