what are date format functions in mysql

 

%M Month name (January through December)
%b Abbreviated month name (Jan through Dec)
%m Month, padded digits (01 through 12)
%c Month (1 through 12)
%W Weekday name (Sunday through Saturday)
%a Abbreviated weekday name (Sun through Sat)
%D Day of the month using the English suffix, such as first, second,
third, and so on
%d Day of the month, padded digits (00 through 31)
%e Day of the month (0 through 31)
%j Day of the year, padded digits (001 through 366)
%Y Year, four digits
%y Year, two digits
%X Four-digit year for the week where Sunday is the first day; used
with %V
%x Four-digit year for the week where Monday is the first day; used
with %v
%w Day of the week (0=Sunday…6=Saturday)
%U Week (0 through 53) where Sunday is the first day of the week
%u Week (0 through 53) where Monday is the first day of the week
%V Week (1 through 53) where Sunday is the first day of the week;
used with %X
%v Week (1 through 53) where Monday is the first day of the week;
used with %x
%H Hour, padded digits (00 through 23)
338 CHAPTER 16: Learning Basic SQL Commands
TABLE 16.2 Continued
%k Hour (0 through 23)
%h Hour, padded digits (01 through 12)
%l Hour (1 through 12)
%i Minutes, padded digits (00 through 59)
%S Seconds, padded digits (00 through 59)
%s Seconds, padded digits (00 through 59)
%r Time, 12-hour clock (hh:mm:ss [AP]M)
%T Time, 24-hour clock (hh:mm:ss)
%p AM or PM
Any other characters used in the DATE_FORMAT() option string appear literally.