
Deborah Watson
2,614 PointsSTRFTIME() Bummer: You may have got your params the wrong way around.
What am I missing here?
Write a query that returns the title first and the month and year it was released alias as month_year_released. Dates should look like "04/1983" for April 1983.
SELECT title, STRFTIME("%m,%y", date_released) AS month_year_released FROM movies;
3 Answers

Steven Parker
205,168 PointsThat message might be a bit confusing, but the instructions say, 'Dates should look like "04/1983"'.
The template shown in the query above has a comma instead of a slash for a separator, and "%y" instead of "%Y" for the year token.

Deborah Watson
2,614 PointsSteven, I removed the first "date_released". I'm not sure what you mean by "fix the template token for the year"
I tried this: SELECT title,STRFTIME("mm/yyyy", date_released) AS month_year_released FROM movies;
And got this: Bummer: Your query retrieve the dates in the correct format

Steven Parker
205,168 PointsIn my original answer, I pointed out two problems in your format template:
- a comma instead of a slash, and
- "%y" instead of "%Y" for the year token.
So, instead of "%m,%y" the template should be "%m/%Y"

Deborah Watson
2,614 PointsThank you! I was researching https://www.sqlite.org/lang_datefunc.html just as you posted this.
Deborah Watson
2,614 PointsDeborah Watson
2,614 PointsI removed the comma and added date_released and got this: Bummer: Your query retrieve the dates in the correct format (%m/%Y). SELECT title, date_released,STRFTIME("%m/%y",date_released) AS month_year_released FROM movies;
Steven Parker
205,168 PointsSteven Parker
205,168 PointsYou already have a formatted "date_released", why add another one unformatted?
Also, you still need to fix the template token for the year.