SQL Function Reference

DATE_FORMAT
Formats a date and time according to the format string
MySQL
DATE_FORMAT(datetime, format)
datetime
Source datetime
format
Format to use
DeterminantDescription
%aShort name of the day of the week (Sun...Sat)
%bShort name of the month (Jan...Dec)
%cMonth in numeric form (1...12)
%DDay of the month with suffix (1st, 2nd, 3rd and etc.)
%dDay of the month in numeric form with a leading zero (01..31)
%eDay of the month in numeric form (1..31)
%fMicrosecond (000000..999999)
%HHour with leading zero (00..23)
%hHour with leading zero (01..12)
%IHour with leading zero (01..12)
%iMinutes with leading zero (00..59)
%jDay of the year (001..366)
%kHour with leading zero (0..23)
%lHour without leading zero (1..12)
%MName of the month (January...December)
%mMonth in numeric form with a leading zero (01..12)
%pAM or PM (for 12 hour format)
%rTime, 12 hour format (hh:mm:ss AM|hh:mm:ss PM)
%SSeconds (00..59)
%sSeconds (00..59)
%TTime, 24 hour format (hh:mm:ss)
%UWeek (00..52) where Sunday is considered first day of the week
%uWeek (00..52), where Monday is considered the first day of the week
%WName of the day of the week (Sunday...Saturday)
%wDay of the week (0...6), 0 - Sunday, 6 - Saturday
%YYear in 4 digits YYYY
%yYear in 2 digits YY
Examples
MySQL
SELECT DATE_FORMAT("2022-06-16 16:37:03", "Начало мероприятия назначено на %d %b, %H:%i") as date_format;