Skip
Arish's avatar

119. Practice - Date Functions


Exercise: Extract Year and Month

Get year and month from a date.

Solution

sql
1SELECT 
2  STRFTIME('%Y', '2024-03-15') AS year,
3  STRFTIME('%m', '2024-03-15') AS month;