| SQLite | ||
| We can extract the year, the month, the day of the month and the day of the week. Times may be extracted in a similar way. The SQL Standard specifies the understandably unpopular EXTRACT function. | ||
| Specific to SQLite | ||
...or if you insist on integers instead of strings:
SELECT CAST(STRFTIME('%Y', wk) AS INTEGER),
CAST(STRFTIME('%m', wk) AS INTEGER),
CAST(STRFTIME('%d', wk) AS INTEGER)
FROM totp WHERE song='Rio'
| ||