Pythonistapro777
Aug 04, 2015 - 09:17
Ok, so I'm making something that counts down the number of days to an event.
Here's the code to the one that works (without user input):
import datetime
today = datetime.date.today()
someday = datetime.date(2015,8,24)
diff = someday - today
print(diff.days)
Here's the one that doesn't work (with user input):
import datetime
import console
today = datetime.date.today()
find = console.input_alert('Date', 'Please enter the date you would like to countdown to.\ni.e. 2009 (year),6 (month),29 (day)', '', 'Enter')
someday = datetime.date(find)
diff = someday - today
print(diff.days)
Thanks in advance!