Home >Database >Mysql Tutorial >What are the different time format characters used by the MySQL DATE_FORMAT() function?
The different time format characters used by the MySQL DATE_FORMAT() function are as follows-
Time format characters | Meaning |
---|---|
%H | is used for abbreviation Hour in 24-hour format, in two-digit format, such as 00, 01, 02 to 23. td> |
%h | #It is used to abbreviate the 12-hour hour in two-digit format, such as 01, 02 to 12. |
%i | # is used to abbreviate minutes in two-digit format, such as 01, 02 up to 59. |
%l | # Used to abbreviate the hour in the 12-hour format, in two-digit format without zeros , such as 01, 02 to 12. td> |
%p | for morning or afternoon |
%r | Used to display the 12-hour time as HH:MM:SS. |
is used to abbreviate seconds in two-digit format, such as 01, 02 to 59. | |
is used to display the 24-hour time as HH:MM:SS. |
|
Used to display the microsecond range |
000000..999999. |
The above is the detailed content of What are the different time format characters used by the MySQL DATE_FORMAT() function?. For more information, please follow other related articles on the PHP Chinese website!