extract year month and day from date mysql code example
Example 1: mysql select month and year
SELECT DATE_FORMAT(test_date,'%Y%m') AS date FROM test_table;
Example 2: mysql extract month from date
SELECT MONTH(field_name) as month FROM yourtable