mysql date sub code example
Example 1: mysql subtract month from timestamp
DATE_SUB((DATE_SUB(curdate(), INTERVAL 1 MONTH)), INTERVAL 4 DAY)
Example 2: mysql subdate
SELECT SUBDATE(NOW(), INTERVAL 1 DAY); --Yesterday
DATE_SUB((DATE_SUB(curdate(), INTERVAL 1 MONTH)), INTERVAL 4 DAY)
SELECT SUBDATE(NOW(), INTERVAL 1 DAY); --Yesterday