DATE_FORMAT()
DATE_FORMAT() is a SQL function in the Date/Time Functions category. Formats a date as a string using a format pattern. MySQL-specific. The syntax is DATE_FORMAT(date, format). It accepts date, format. It returns formatted string. A typical example: SELECT DATE_FORMAT(NOW(), '%Y-%m-%d'); -- 2026-06-06 SELECT DATE_FORMAT(NOW(), '%M %d, %Y %H:%i'); -- June 06, 2026 14:30 SELECT DATE_FORMAT(hire_date, '%Y/%m') FROM employees; A close relative is NOW(), which returns the current date and time as a timestamp. A close relative is CURDATE(), which returns the current date without time. A close relative is DATE(), which extracts the date part from a datetime expression. More about this category: Date and time functions — NOW, DATE, EXTRACT, DATEDIFF, DATE_ADD, DATE_FORMAT. Related Date/Time Functions entries: NOW(), CURDATE(), DATE(), EXTRACT(), DATE_ADD(), DATE_SUB(), DATEDIFF(), STR_TO_DATE(). This page is part of the free SQL Reference documentation covering 762+ statements, functions, and clauses, each with syntax, parameters, return values, and examples for MySQL, PostgreSQL, SQL Server, and SQLite.