MySQL Curdate function is a MySQL Date Function, which is useful to return the current date value in YYYY-MM-DD or YYYYMMDD format. The syntax of the Curdate Function in MySQL is as shown below:
CURDATE();
MySQL CURDATE Example
The following query shows you the basic use of this curdate function.
SELECT CURDATE();
As you can see from the above screenshot, it is showing today’s date in YYYY-MM-DD format. Let me show you another Date Function example with Alias Name.
SELECT CURDATE() AS 'Todays Date';
The following MySQL query shows you what happens when adding days to this current date function.
SELECT CURDATE() + 2 AS 'Date String';
SELECT CURDATE() + 12 AS 'Date String';
From the above screenshot, it added those days to the current date. Next, it is displaying the date in the YYYYMMDD string format.