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

Databases Reporting with SQL Date and Time Functions Formatting Dates and Times

This one is really confusing

I've been on this bad boy for an hour now, definitely missing a minor syntax

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Talon Ward! I'd sort of love to know what you've tried. The challenge is asking us to get the title and the date_released but it wants that date_released in the format of month/year (excluding the day). Then we need to alias that as month_year_released. In this challenge, we are not concerned with the day.

This was my solution:

SELECT title, STRFTIME('%m/%Y', date_released) AS month_year_released FROM movies;

To use the STRFTIME function you need to pass in the format and then the field you're trying to format, which is what I've done above.

Hope this helps! :sparkles:

I had the exact same code, and I didn't capitalize the 'Y' in the STRFTIME function. I didn't know that was case sensitive. Thank you!