curdate,current_date
Description
Obtains the current date and returns a value of the DATE type.
Syntax
DATE CURDATE()
Examples
mysql> SELECT CURDATE();
+------------+
| curdate() |
+------------+
| 2024-03-27 |
+------------+
mysql> SELECT CURRENT_DATE();
+----------------+
| current_date() |
+----------------+
| 2024-03-27 |
+----------------+
mysql> SELECT CURDATE() + 0;
+-----------------+
| (curdate()) + 0 |
+-----------------+
| 20240327 |
+-----------------+
mysql> SELECT CURDATE() +2;
+-----------------+
| (curdate()) + 2 |
+-----------------+
| 20240329 |
+-----------------+
mysql> SELECT CURDATE() - INTERVAL 5 DAY;
+----------------------------+
| curdate() - INTERVAL 5 DAY |
+----------------------------+
| 2024-03-22 00:00:00 |
+----------------------------+
mysql> SELECT QUARTER(CURDATE());
+--------------------+
| quarter(curdate()) |
+--------------------+
| 1 |
+--------------------+