MySQL has the LAST_DAY(date) function that returns the date for the last day of the month:
SELECT LAST_DAY(fecha) AS ultimo_dia
FROM table
How can I get the date for the first day of the month?
MySQL has the LAST_DAY(date) function that returns the date for the last day of the month:
SELECT LAST_DAY(fecha) AS ultimo_dia
FROM table
How can I get the date for the first day of the month?