Difference between revisions of "SQLite - Select Date for a specific month - Extract month from a date to check that in a where clause"

(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...")
(No difference)

Revision as of 15:00, 6 October 2019

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