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

date format not accepted despite being correct

In "in reporting with SQL" the penultimate challenge task wont accept the date format: requires %m/%Y i wrote STRTIME("%m/%Y".......

Its not accepted.

My bad, this is the whole thing i wrote:

SELECT title, STRFTIME("%m/%Y", date_released) AS month_year_released FROM movies WHERE date_released = "April 1983";

the error is still saying ==> Bummer: Your query retrieve the dates in the correct format (%m/%Y)

3 Answers

Tommy Gebru
Tommy Gebru
30,164 Points

Hey there Jonathan so the solution is simpler than we think - the Instructions need to be edited :point_left: because the last sentence should read as "For Example: Dates should look like "04/1983" for April 1983."

So you have already solved the challenge, just remove the WHERE statement!

Ok keep up the good work :smile: and be sure to mark the best answer in this forum post! This will highlight a solution and help others as well

Thank you so much!

Steven Parker
Steven Parker
231,275 Points

It looks like you wrote STRTIME instead of STRFTIME (with an "F").

If that's not the whole issue, please post your complete query so we can see if there's another problem.

Tommy Gebru
Tommy Gebru
30,164 Points

Don't forget to check the function name Jonathan

STRFTIME

Also be sure to share and format your code, in the forum conversations :wink:

@Steven Parker :wave: