DAYOFMONTH()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the day of the month in the given date.
USAGE
DAYOFMONTH(date)
Argument Name | Description |
|---|---|
| The date to evaluate |
DETAILS
DAYOFMONTH() is a date-time function that returns the day of the month.
The return value will be 0 for a day that has 00 in the day, such as 0000-00-00, or 2021-01-00. Otherwise it will be a valid day for the associated month.
A NULL is returned if the argument is NULL.
EXAMPLES
SELECT DAYOFMONTH('2020-02-29');
+--------------------------+
| DAYOFMONTH('2020-02-29') |
+--------------------------+
| 29 |
+--------------------------+
