How to sort a MySQL query with a date in date format to take only the month

0

I have a date field, I'd like to make a query to get only the month of that field. How can I do this?

    
asked by anonymous 17.07.2017 / 16:08

1 answer

1

Just use the MONTH function of MySQL .

SELECT MONTH(seu_campo);
    
17.07.2017 / 16:10