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
28,819 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
174,115 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
28,819 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: