SQLite - Select Date for a specific month - Extract month from a date to check that in a where clause

Revision as of 15:00, 6 October 2019 by Ardaut (talk | changes) (Created page with "Use strftime() - Here as an example all dates with the month July (number 7) are selected. <pre>SELECT * FROM tablename WHERE strftime('%m', date_column) = '07'</pre> More a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Use strftime() - Here as an example all dates with the month July (number 7) are selected.

SELECT * FROM tablename WHERE strftime('%m', date_column) = '07'

More about strftime()
https://www.w3resource.com/sqlite/sqlite-strftime.php