Welcome to the Treehouse Community
Looking to learn something new?
Datetime Code Challenge Help!
I tried to use the python doc to help pass this challenge , but either I am not running it correctly or am using the wrong thing. ( https://docs.python.org/2/library/datetime.html#datetime.datetime.combine )
I guess I am not quite understanding what the Challenge is wanting me to do...
import datetime def time_tango(date, time): return datetime.combine(date, time)
You are very close. This may seem strange, but you need to include datetime twice in your return statement, like so: return datetime.datetime.combine(date, time)
Kenneth LoveTreehouse Guest Teacher
datetime module has a
datetime class inside of it that you need to use. It's weird to type
datetime.datetime but you'll a) use this all the time in production code; and b) see this pattern in many other modules, too.
Also, make sure you're always using the docs for Python 3. Your link up there goes to Python 2.