mysql> select date_format(now(),'%Y');
+-------------------------+
| date_format(now(),'%Y') |
+-------------------------+
| |
+-------------------------+
row in set (0.00 sec)
扩展: %Y:年 %c:月 %d:日 %H:小时 %i:分钟 %s:秒
mysql> select date_format(now(),'%Y-%c-%d %h:%i:%s'); +----------------------------------------+
| date_format(now(),'%Y-%c-%d %h:%i:%s') |
+----------------------------------------+
| -- :: |
+----------------------------------------+
row in set (0.00 sec) ---
相关文章
- mysql之时间截取函数DATE_FORMAT
- MySQL日期格式及日期函数
- mysql函数str_to_date字符串转日期
- mysql 天数减1_MySQL日期加减函数详解
- 【Power Automate】日期格式化函数formatDateTime详细说明及示例
- MySQL日期时间操作函数(挺全的)
- Mysql convert函数、convert用法、字符串转数字、字符串转日期、类型转换函数
- mysql怎么更改日期的格式_如何在MySQL中使用DATE_FORMAT更改日期格式?
- MySql时间日期函数及格式化详解
- mysql 数据库时间类型 datetime 数据在页面上显示一串数字, 用函数date_format( )转换格式 ;