I'm using CPython. This is the code:
import datetime
userBirthday = print("Enter your birthday(DD/MM/YYYY): ")
compBirthday = datetime.datetime.strptime(userBirthday, "%d/%b/%Y")
I get this error message:
ValueError: time data '13/12/2001' does not match format '%d/%b%Y'
You wanted this instead:
Where m stands for "month".
Also, checkout
dateutil.parser.parse
, which can recognise a wide variety of formats.