CURDATE

CURDATE is a date function in SQL that returns the current date. The returned date follows the format 'YYYY-MM-DD' and does not require any parameters. It is commonly used in retrieving today's date within SQL statements. The specific formatting could be different on different SQL variations.

CURDATE()

Example

SELECT CURDATE();

Output

+------------+
| CURDATE() |
+------------+
| 2022-01-15 |
+------------+

Explanation

The CURDATE() function in SQL retrieves the current date. The output format is ‘YYYY-MM-DD’. Notice that the actual output will vary depending on the date when the function is called.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.