DATE_FORMAT()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Returns a date value in the given format string.
EXAMPLES
SELECT DATE_FORMAT('2020-01-01 01:23:00', '%W %D %M %Y');
+---------------------------------------------------+
| DATE_FORMAT('2020-01-01 01:23:00', '%W %D %M %Y') |
+---------------------------------------------------+
| Wednesday 1st January 2020 |
+---------------------------------------------------+
SELECT DATE_FORMAT('2020-01-01 01:23:00', '%H:%i:%s')
+------------------------------------------------+
| DATE_FORMAT('2020-01-01 01:23:00', '%H:%i:%s') |
+------------------------------------------------+
| 01:23:00 |
+------------------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.