MySQL CURDATE() Function

In MySQL, the CURDATE() function returns the system’s current date in YYYY-MM-DD or YYYYMMDD format.

The function is exactly the same as the CURRENT_DATE() function.

CURDATE() Syntax

Here is the syntax of MySQL CURDATE() function:

CURDATE()

CURDATE() Examples

Returns the current date for the system.

SELECT
    CURDATE(),
    CURDATE() + 0;
+------------+---------------+
| CURDATE()  | CURDATE() + 0 |
+------------+---------------+
| 2022-04-12 |      20220412 |
+------------+---------------+

Note: The result of CURDATE() + 0 is in the YYYYMMDD format.

CURDATE() + N means adding N days to the current date. For example, the following statments is used to add 1 day to the current date:

SELECT CURDATE() + 1;
+---------------+
| CURDATE() + 1 |
+---------------+
|      20220413 |
+---------------+