Reputation: 1998
I use the Month function like below to filter for a month as:
Where MONTH(timestampcolumn) = '9'
If I want to do same but filter for month based on name like September how would I do that?
Thanks
Upvotes: 0
Views: 463
Reputation: 147166
You can use DATE_FORMAT
to convert the timestamp into a month name using the %M
format string:
WHERE DATE_FORMAT(timestampcolumn, '%M') = 'September'
Upvotes: 3