Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRon Chan
10,987 PointsCode Challenge: Time Tango
I am not passing the challenge for some reasons. In answering the question, I am making a lot of assumptions here about the format of date and time which will be passed into the time_tango method as arguments. Can I assume for the code challenge the date is in the year-month-date format while time is in the hour-minutes format?
import datetime
def time_tango(date, time):
date_time = datetime.datetime.strptime("{} {}".format(date, time), "%Y-%m-%d %H:%M")
return date_time
Ron Chan
10,987 PointsRon Chan
10,987 PointsYes it does, mike. Thanks for not giving away the plot. :o)