sql extract year month from date code example Example: mysql extract month SELECT EXTRACT(MONTH FROM '2020-07-05')