MySQL has a number of functions that allow you to format the date and time. These include functions such as DATE_FORMAT()
and TIME_FORMAT()
.
When using these functions, you provide arguments that tell it what format you’d like the date or time to be in. These arguments are called format specifiers, and they begin with a percentage sign (%
) followed by a character (usually a letter, but not always).
The following table lists the format specifiers that can be used when formatting the date and time in MySQL.