How QUARTER() Works in MariaDB

In MariaDB, QUARTER() is a built-in date and time function that returns the quarter from a given date expression.

It accepts one argument, which is the date you want to extract the quarter from.

It returns the quarter as a number in the range 1 to 4. For dates with zero months (e.g. 0000-00-00 or 2025-00-00), the result is 0.

Read more

How YEAR() Works in MariaDB

In MariaDB, YEAR() is a built-in date and time function that returns the year from a given date expression.

It accepts one argument, which is the date you want to extract the year from.

It returns the year as a number in the range 1000 to 9999. For zero dates (e.g. 0000-00-00), the result is 0.

Read more

How WEEKOFYEAR() Works in MariaDB

In MariaDB, WEEKOFYEAR() is a built-in date and time function that returns the calendar week of a given date as a number in the range from 1 to 53.

It’s the equivalent of using the WEEK() function in mode 3, and therefore its result is in accordance with ISO 8601:1988.

It accepts one argument; the date you want to extract the week from.

Read more