This tutorial explains how to use the MySQL QUARTER function with syntax and examples.
The MySQL QUARTER function returns the quarter portion of a date value.
The syntax for the QUARTER function in MySQL is:
A date or datetime value from which to extract the quarter.
The QUARTER function can be used in the following versions of MySQL:
Let's look at some MySQL QUARTER function examples and explore how to use the QUARTER function in MySQL.
For example:
This last QUARTER example would display the quarter portion of the current system date (current system date is returned by the CURDATE function).