MySQL DAYOFMONTH function is one of the Date Function, which is used to return the Day Number of the given date or an expression.
In this article, we will show you, How to use this DAYOFMONTH function in MySQL with example.
MySQL DAYOFMONTH Syntax
The basic syntax of the Day Of Month Function in MySQL is as shown below:
MySQL DAYOFMONTH Example
The following query will show you the use of this MySQL day of Month function.
First, we used date expression inside this DAYOFMONTH function. Next, we used the Date and Time expression. Both these statements will return the Day number from the given dates.
SELECT DAYOFMONTH('2017-09-16 01:14:22');
SELECT DAYOFMONTH(NOW()), DAYOFMONTH(CURTIME());
From the above screenshot, it displays the todays day number
Thank You for Visiting Our Blog