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 trial

Python Dates and Times in Python (2014) Let's Build a Timed Quiz App Harder Time Machine

Am I supposed to work with timedelta differences or can I go directly to datetime arguments?

This exercise is being harder to understand than I thought at first.

So, I have to create a function that recieves 2 arguments, on of those is a string with either "hours" or "days" or... and I'm supposed to return a datetime with the difference between the starter date and the new date?

I'm really confused and there are no real hints I can use.

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Glad you got it! I'm always happy to have suggestions on how to make code challenges clearer.

Finally, after a couple of tries I got it. Timedeltas was the answer.