Answers for "mysql last month"

SQL
4

mysql get last day of month

SELECT LAST_DAY(CURDATE());						-- Current month
SELECT LAST_DAY(CURDATE() - INTERVAL 1 MONTH);	-- Previous month
SELECT LAST_DAY(CURDATE() + INTERVAL 1 MONTH);	-- Next month
Posted by: Guest on May-21-2021
0

mysql last 6 months

.... where yourdate_column > DATE_SUB(now(), INTERVAL 6 MONTH)
Posted by: Guest on May-06-2020
0

mysql last friday of current month

SELECT LAST_DAY(NOW()) - ((7 + WEEKDAY(LAST_DAY(NOW())) - 4) % 7);
Posted by: Guest on October-25-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language