Date_forma T (date, format) format the date or Date and Time Value Based on the format string, and return the result string. You can use 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) % 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 "%" select date_format (Date field, '% Y-% m-% D') as 'date' from test