1、NOW(),用于获取当前日期和时间函数
	select now() as '当前日期和时间' from kw360net;
返回:2023-01-12 20:27:21
2、CURDATE(),用于获取当前日期,同CURRENT_DATE()
	select curdate() as '当前日期' from kw360net;
返回:2023-01-12
3、CURTIME(),用于获取当前时间,同CURRENT_TIME()
	select curtime() as '当前时间' from kw360net;
返回:20:27:57
4、CURRENT_TIMESTAMP(),用于获取当前日期和时间函数
select CURRENT_TIMESTAMP() kw360net;
返回:2023-01-12 20:29:21
另外,在创建表时,可以为时间字段指定创建时间和更新时间。例如:
	CREATE TABLE `t01` (
	 `name` varchar(64) DEFAULT '' COMMENT '名字',
	 `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
	 `utime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;
如果使用Navicat,在设置时间字段时,要勾选"根据当前时间戳更新",还要在默认栏中填上"CURRENT_TIMESTAMP"
5、DATE() 函数,用于提取时间字段的日期,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"YYYY-mm-dd"
	select date(tdate) from t01;
返回:2023-01-12
6、YEAR() 函数,用于提取时间字段的年,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"YYYY"
	select year(tdate) from t01;
返回:2020
7、MONTH()函数,用于提取时间字段的月,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"mm",若月份前有0会忽略
	select month(tdate) from t01;
返回:5
8、DAY()函数,用于提取时间字段的日期,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"dd",若日期前有0会忽略
	select day(tdate) from t01;
返回:26
9、TIME()函数,用于提取时间字段的时间,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"HH:ii:ss"
	select time(tdate) from t01;
返回:11:11:11
10、HOUR() 函数,用于提取时间字段的小时,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"HH",若小时前有0会忽略,如08则返回8
	select hour(tdate) from t01;
返回:11
11、MINUTE()函数,用于提取时间字段的分钟,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"ii",若分钟前有0会忽略,如08则返回8
	select minute(tdate) from t01;
返回:11
12、SECOND()函数,用于提取时间字段的秒,例如t01的tdate为'2023-01-12 11:11:11',返回的格式为"ss",若秒前有0会忽略,如08则返回8
	select HOUR(tdate) from t01;
返回:11
13、UNIX_TIMESTAMP()函数,获取当前时间戳,还可以将时间字段转换成时间戳
select unix_timestamp() 返回:当前时间的时间戳
	select unix_timestamp(tdate) from t01;
返回:1590462671
时间格式化函数 DATE_FORMAT() 和 TIME_FORMAT()功能相同
	select date_format(tdate,'%Y-%m-%d %H:%i:%s') from t01;
返回:2023-01-12 11:11:11
	select date_format(tdate,'%Y-%m-%d') from t01;
返回:2023-01-12

 2024年国庆节放假时间_
			  2024年国庆节放假时间_ 2024年元旦放假安排时间
			  2024年元旦放假安排时间 js日期转时间戳
			  js日期转时间戳 mysql查询limit出现重复数据解决办法
			  mysql查询limit出现重复数据解决办法![mysql: [Warning] Using a password on the command line interf](/uploads/allimg/240620/1-2406201452090-L.gif) mysql: [Warning] Using a password on the command line interf
			  mysql: [Warning] Using a password on the command line interf mysql多表合并UNION ALL和UNION及区别
			  mysql多表合并UNION ALL和UNION及区别