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

Mohd Aamir Mir
Mohd Aamir Mir
3,281 Points

select title,STRFTIME(%m%y,date_released) as month_year_released from movies;

Please help with this one

1 Answer

Steven Parker
Steven Parker
201,931 Points

You're close, but have a few syntax issues:

  • the format string for STRFTIME must be enclosed in quotes
  • the format token for a 4-digit year is "Y" (capital Y)
  • the format should include a slash between the month and year