Jun-26-2017, 07:03 PM
Accepting that the logic is entirely flawed in the first place,
I think this is what you intended:
There are many ways to manipulate dates in existing python libraries
see: https://pypi.python.org/pypi?%3Aaction=s...mit=search
I think this is what you intended:
import datetime try: DB = input("Date of Birth: ('yyyy-mm-dd'): ") datetime.datetime.strptime(DB, '%Y-%m-%d') except ValueError: raise ValueError("Incorrect data format, should be YYYY-MM-DD") x = float(DB[:4]) y = float(x+11) z = float(y/100) print ("Is {} the date of your birthday?".format(z))Not sure what you are trying to do.
There are many ways to manipulate dates in existing python libraries
see: https://pypi.python.org/pypi?%3Aaction=s...mit=search