我是靠谱客的博主 闪闪夏天,这篇文章主要介绍MySQL中时间格式化函数DATE_FORMAT(date,format)中标识符含义MySQL中时间格式化函数DATE_FORMAT(date,format)中标识符含义,现在分享给大家,希望可以做个参考。

MySQL中时间格式化函数DATE_FORMAT(date,format)中标识符含义

标识符描述解释
%aAbbreviated weekday name (Sun…Sat)缩写的周一到周天
%bAbbreviated month name (Jan…Dec)缩写的一月到十二月
%cMonth, numeric (0…12)一位数的一月到十二月
%DDay of the month with English suffix (0th, 1st, 2nd, 3rd, …)带有英文后缀的月份日期
%dDay of the month, numeric (00…31)两位数的月份日期
%eDay of the month, numeric (0…31)一位数的月份日期
%fMicroseconds (000000…999999)微秒
%HHour (00…23)两位数的24小时
%hHour (01…12)两位数的12小时
%IHour (01…12)两位数的12小时
%iMinutes, numeric (00…59)两位数的分钟数
%jDay of year (001…366)三位数的年份天数
%kHour (0…23)两位数的24小时
%lHour (1…12)两位数的12小时
%MMonth name (January…December)英文的一月到十二月
%mMonth, numeric (00…12)两位数的一月到十二月
%pAM or PM英文的上午或下午
%rTime, 12-hour (hh:mm:ss followed by AM or PM)带有AM或PM的12小时制时间03:12:53 PM
%SSeconds (00…59)秒
%sSeconds (00…59)秒
%TTime, 24-hour (hh:mm:ss)24小时制的时间 15:12:53
%UWeek (00…53), where Sunday is the first day of the week; WEEK() mode 0第多少周,周天为一周的第一天
%uWeek (00…53), where Monday is the first day of the week; WEEK() mode 1第多少周,周一为一周的第一天
%VWeek (01…53), where Sunday is the first day of the week; WEEK() mode 2; used with %X第多少周,周天为一周的第一天
%vWeek (01…53), where Monday is the first day of the week; WEEK() mode 3; used with %x第多少周,周一为一周的第一天
%WWeekday name (Sunday…Saturday)英文的周一到周天
%wDay of the week (0=Sunday…6=Saturday)数字的周一到周天 0为周天
%XYear for the week where Sunday is the first day of the week, numeric, four digits; used with %V四位数的年份,周天为一周的第一天
%xYear for the week, where Monday is the first day of the week, numeric, four digits; used with %v四位数的年份,周一为一周的第一天
%YYear, numeric, four digits四位数的年份
%yYear, numeric (two digits)两位数的年份
%%A literal % character
%xx, for any “x” not listed above

最后

以上就是闪闪夏天最近收集整理的关于MySQL中时间格式化函数DATE_FORMAT(date,format)中标识符含义MySQL中时间格式化函数DATE_FORMAT(date,format)中标识符含义的全部内容,更多相关MySQL中时间格式化函数DATE_FORMAT(date内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(225)

评论列表共有 0 条评论

立即
投稿
返回
顶部