CURDATE() : CURDATE « Date Time Functions « MySQL Tutorial






Returns the current date as a value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in a string or numeric context.

CURRENT_DATE is the synonym for CURDATE().

mysql>
mysql> SELECT CURDATE();
+------------+
| CURDATE()  |
+------------+
| 2007-07-22 |
+------------+
1 row in set (0.00 sec)

mysql> SELECT CURDATE() + 0;
+---------------+
| CURDATE() + 0 |
+---------------+
|      20070722 |
+---------------+
1 row in set (0.00 sec)

mysql>
mysql>
mysql> select CURRENT_DATE();
+----------------+
| CURRENT_DATE() |
+----------------+
| 2007-07-22     |
+----------------+
1 row in set (0.00 sec)

mysql>
mysql>
mysql>








14.5.CURDATE
14.5.1.CURDATE()
14.5.2.Using CURDATE() function