Query
If you want to subtract the desired number of days from the current date using CURDATE() function.
SELECT CURDATE() -22;
Output
CURDATE() Function in MySQL
The CURDATE() function in MYSQL is used to return the current date. The date is returned to the format of “YYYY-MM-DD” (string) or as YYYYMMDD (numeric). This function equals the CURRENT_DATE() function. In this article, we are going to discuss about CURDATE() function in detail.
Syntax
CURDATE();
Parameter
This method does not accept any parameter.
Returns
It returns the current date.