Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Einars Vilnis
8,050 Pointscombo.py callenge
hallo guys! I simply don't get this at all . i guess that my function is wrong but I don't even now where and why :(
import datetime
def time_tango(day, mytime):
day = datetime.datetime.strftime('%d/%m/%y')
mytime = datetime.datetime.strftime('%H:%M')
daymytime1 = day + mytime
daymytime = datetime.datetime.strptime(daymytime, '%d/%m/%y %H:%M')
return daymytime

Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 PointsHey there, is it giving an error code or compiler error?
3 Answers

Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 PointsHey there Einars,
I can see that you were able to look into this and found the function on the new thread, was that able to clear up any questions you had?
If so, I was able to get the challenge to pass by passing the function built into it
import datetime
def time_tango(date, time):
return datetime.datetime.combine(date, time)
Thanks, let me know if this doesn't help.

Einars Vilnis
8,050 PointsYes it did help ! thanks for your time.

Einars Vilnis
8,050 Pointsit shows that it doesn't return the right datetime, and by the way ' time = datetime.time(10, 10, 10, 10, None)' in my final code

Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 PointsOkay I'm on my phone right now I'd have to give this a look in an hour or so once I get home.

Einars Vilnis
8,050 Pointsthank you.
Einars Vilnis
8,050 PointsEinars Vilnis
8,050 Pointsimport datetime
def time_tango(date, time): date = datetime.date(2015, 10, 15) date = date.strftime('%d.%m.%Y') time = datetime.time(10, 10, 10, 10, None) time = time.strftime('%H:%M') datetime1 = '{} {}'.format(date, time) new_date = datetime.datetime.strptime(datetime1, '%d.%m.%Y %H:%M') return new_date
my new try and still isnt working