extract month and year from date in mysql code example Example: mysql extract month from date SELECT MONTH(field_name) as month FROM yourtable