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 trialIsaac John
7,516 Pointstime_tango test
import datetime
def time_tango(date, time): #takes a date and time
result = datetime.datetime.combine(date, time) #combines date with time
return result
http://teamtreehouse.com/library/dates-and-times-in-python/dates-and-times/time-tango
I searched python docs to help with the answer. https://docs.python.org/release/2.6/library/datetime.html#datetime.datetime.combine
Can anyone tell me what went wrong? Maybe I'm taking it too literal? maybe it's just one argument? I don't know the exact date and time so to use strftime or strptime is difficult.....unless i convert the two arguments to strings....hmm
Update! I got through with it thanks :)
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Isaac,
You need another datetime
to reference the module name.
comb = datetime.datetime.combine(date, time)
Isaac John
7,516 PointsIsaac John
7,516 Pointsurgh thanks :)