QUARTER()
QUARTER() is a SQL function in the Date/Time Functions category. MySQL: returns the quarter of the year (1-4) for a given date. The syntax is QUARTER(date). It accepts date. It returns quarter number (1-4). A typical example: SELECT QUARTER('2026-06-06'); -- 2 (April-June) SELECT QUARTER(order_date) AS quarter, SUM(amount) AS total FROM orders WHERE YEAR(order_date) = 2026 GROUP BY QUARTER(order_date); -- Sales totals per quarter -- PostgreSQL equivalent: SELECT EXTRACT(QUARTER FROM date_column) FROM table; -- SQL Server: SELECT DATEPART(quarter, date_column) FROM table; 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(), DATE_FORMAT().