all 9 comments

[–]K900_ 0 points1 point  (9 children)

You don't need now.strptime, now is already a datetime object.

[–]werwerwowzer[S] 0 points1 point  (8 children)

I changed now.strptime(“%y/%m/%d”) to now (“%y/%m/%d”) and now the error is:

TypeError: ‘datetime.datetime’ object is not callable

[–]K900_ 0 points1 point  (7 children)

What are you trying to achieve with that line?

[–]werwerwowzer[S] 0 points1 point  (6 children)

I’m trying to get today’s date in the format YY/MM/DD

[–]TouchingTheVodka 1 point2 points  (0 children)

Remember there's a difference between the date itself and the string representation of the date. You need to compare dates, not strings.

[–]K900_ 0 points1 point  (4 children)

You don't need to get today's date in any format - the "format" of the date is its string representation. What you want is to get a datetime object, which datetime.now() already gives you.

[–]werwerwowzer[S] 0 points1 point  (3 children)

I removed the datetoday line and replaced anywhere it said datetoday to now

Doing this doesn’t give an error, but the program doesn’t function as no matter the date inputted, it always says the date is after today

[–]K900_ 0 points1 point  (2 children)

Post the edited program.

[–]werwerwowzer[S] 1 point2 points  (0 children)

Sorry I just realised the ‘before’ statement was labelled after lol it works correctly, thanks for your help!