The Mysql formatting date function DATE_FORMAT (date, format) formats the date or date and Time Value date based on the format string and returns the result string. Www.2cto.com DATE_FORMAT () to format the DATE or DATETIME value to obtain the expected format. Format the date value in the format of % S and % s according to the format string ,..., 59) % I two-digit score ,..., 59) % H two-digit hour, 24 hours ,..., 23) % h, % I two-digit hour, 12 hours ,..., 12) % k number in the form of hour, 24 hours (0, 1 ,..., 23) % l hour in number format, 12 hours (1, 2 ,..., 12) % T 24 hour time format (h: m: s) % r 12 hour time format (hh: mm: ss AM or hh: mm: ss PM) % p AM or p m % W name of each day in a week (S u n d a y, Monday ,..., saturday) % a abbreviation of the name of each day in a week (Sun, Mon ,..., sat) % d indicates the number of days in a month (00, 01 ,..., 31) % e indicates the number of days in the month (1, 2 ,..., 31) % D indicates the number of days in a month (1st, 2nd, 3rd ,...) % w represents the number of days in a week (0 = S u n d a y, 1 = Monday ,..., 6 = Saturday) www.2cto.com % j represents the number of days in the year (001,002 ,..., 366) % U Week (0, 1, 52), where Sunday is the first day of the week % u Week (0, 1, 52 ), monday is the first day of the week % M month name (J a n u a r y, February ,..., december) % B abbreviated month name (J a n u a r y, February ,..., december) % m double-digit month (01, 02 ,..., 12) % c indicates the month (1, 2 ,..., 12) % Y four-digit year % y two-digit year % direct value "%"