跳到主要内容

curdate,current_date

curdate,current_date

description

Syntax

DATE CURDATE()

获取当前的日期,以DATE类型返回

Examples

mysql> SELECT CURDATE();
+------------+
| CURDATE() |
+------------+
| 2019-12-20 |
+------------+

mysql> SELECT CURDATE() + 0;
+---------------+
| CURDATE() + 0 |
+---------------+
| 20191220 |
+---------------+

keywords

CURDATE,CURRENT_DATE