0

I think this is something simple but cannot figure it out. I have a string as a date that comes in as an argument in this format: 01/12/2017. I compare this with the current date: now.strftime("%d/%m/%Y")

The code:

if date <= now.strftime("%d/%m/%Y"):
                        print(1)

Problem is if the current date is less than the date I pass in this still returns true.

I've googled and looks like this is the way to do it.

Sam
  • 1,207
  • 4
  • 26
  • 50

0 Answers0