MySQL日期
时间:2020-11-14 00:37:56
收藏:0
阅读:30
now(), current_timestamp(); -- 当前日期时间
current_date(); -- 当前日期
current_time(); -- 当前时间
SELECT DATE(‘2011-11-11 11:11:11‘); -- 获取日期部分
time(‘yyyy-mm-dd hh:ii:ss‘); -- 获取时间部分
SELECT DATE_FORMAT(‘2011-11-11 11:11:11‘, ‘%Y-%m-%d %r‘); -- 格式化时间
原文:https://www.cnblogs.com/wangshx666/p/13971914.html
评论(0)