How do I extract the month and date from a mySQL date and compare it to another date?
I found this MONTH() but it only gets the month. I looking for month and year.<
If you are comparing between dates, extract the full date for comparison. If you are comparing the years and months only, use
SELECT YEAR(date) AS 'year', MONTH(date) AS 'month' FROM Table Where Condition = 'Condition';