-------------------------------+ | %S | Seconds with 2 digits. | +---------------------------+------------------------------------------------+ | %s | Seconds with 2 digits. | +---------------------------+------------------------------------------------+ | %T | Time in 24 hour format. Short for '%H:%i:%S'. | +---------------------------+------------------------------------------------+ | %U | Week number (00-53), when first day of the | | | week is Sunday. | +---------------------------+------------------------------------------------+ | %u | Week number (00-53), when first day of the | | | week is Monday. | +---------------------------+------------------------------------------------+ | %V | Week number (01-53), when first day of the | | | week is Sunday. Used with %X. | +---------------------------+------------------------------------------------+ | %v | Week number (01-53), when first day of the | | | week is Monday. Used with %x. | +---------------------------+------------------------------------------------+ | %W | Full weekday name in current locale (Variable | | | lc_time_names). | +---------------------------+------------------------------------------------+ | %w | Day of the week. 0 = Sunday, 6 = Saturday. | +---------------------------+------------------------------------------------+ | %X | Year with 4 digits when first day of the week | | | is Sunday. Used with %V. | +---------------------------+------------------------------------------------+ | %x | Year with 4 digits when first day of the week | | | is Monday. Used with %v. | +---------------------------+------------------------------------------------+ | %Y | Year with 4 digits. | +---------------------------+------------------------------------------------+ | %y | Year with 2 digits. | +---------------------------+------------------------------------------------+ | %Z | Timezone abbreviation. From MariaDB 11.3.0. | +---------------------------+------------------------------------------------+ | %z | Numeric timezone +hhmm or -hhmm presenting | | | the hour and minute offset from UTC. From | | | MariaDB 11.3.0. | +---------------------------+------------------------------------------------+ | %# | For str_to_date(), skip all numbers. | +---------------------------+------------------------------------------------+ | %. | For str_to_date(), skip all punctation | | | characters. | +---------------------------+------------------------------------------------+ | %@ | For str_to_date(), skip all alpha characters. | +---------------------------+------------------------------------------------+ | %% | A literal % character. | +---------------------------+------------------------------------------------+ To get a date in one of the standard formats, GET_FORMAT() can be used. Examples -------- SELECT DATE_FORMAT('2009-10-04 22:23:00', '%W %M %Y'); +------------------------------------------------+ | DATE_FORMAT('2009-10-04 22:23:00', '%W %M %Y') | +----------------ʩv4