date_format

    Convert the date type to a bit string according to the format type. Currently supports a string with a maximum 128 bytes and returns NULL if the length of the return value exceeds 128

    The date parameter is the valid date. Format specifies the date/time output format.

    The formats available are:

    % a | Abbreviation for Sunday Name

    % B | Abbreviated Monthly Name

    % C | Month, numerical value

    % D | Sky in the Moon with English Prefix

    % d | Monthly day, numerical value (00-31)

    % e | Monthly day, numerical value (0-31)

    % f | microseconds

    % H | Hours (00-23)

    % I | Hours (01-12)

    % I | min, numerical value (00-59)

    % J | Days of Year (001-366)

    % k | hours (0-23)

    % L | Hours (1-12)

    % M | Moon Name

    % m | month, numerical value (00-12)

    %p | AM or PM

    % R | Time, 12 - hour (hh: mm: SS AM or PM)

    % S | seconds (00-59)

    % s | seconds (00-59)

    % U | Week (00-53) Sunday is the first day of the week

    % U | Week (00 - 53) Monday is the first day of the week

    % V | Week (01-53) Sunday is the first day of the week, and% X is used.

    % v | Week (01 - 53) Monday is the first day of the week, and% x is used

    % W | Sunday

    % w | Weekly day (0 = Sunday, 6 = Saturday)

    % X | Year, where Sunday is the first day of the week, 4 places, and% V use

    % X | year, of which Monday is the first day of the week, 4 places, and% V

    % Y | Year, 4

    % Y | Year, 2

    %% | Represent %