mysql get first day of month code example
Example: mysql first day of month
-- Replace curdate() with your date column
SELECT curdate(),
DATE_SUB( curdate(), INTERVAL DAYOFMONTH(curdate())-1 DAY ) AS '1st of month';
-- Replace curdate() with your date column
SELECT curdate(),
DATE_SUB( curdate(), INTERVAL DAYOFMONTH(curdate())-1 DAY ) AS '1st of month';