mysql获取当月的倒数第二天

获取当月日期:SELECT CURDATE();

获取当月最后一天:SELECT LAST_DAY(CURDAY());

获取当月倒数第二天:SELECT DATE_ADD(LAST_DAY(CURDAY()),INTERVAL -2 DAY);

获取当月倒数第三天:SELECT DATE_ADD(LAST_DAY(CURDAY()),INTERVAL -3 DAY);

你可能感兴趣的:(mysql,sql,数据库)