DAY in MySQL

DAY() in MySQL returns the day of the month for a specified date. The day returned will be within the range of 1 to 31. If the given date is ‘2013-03-13’, the function will return 13. The DAYOFMONTH() is the synonym of DAY().

DAY in MySQL Syntax:

Here date is any valid date.

EXample :

The following statement will return the day of the month from the specified date.

Given date format must be in “yyyy/mm/dd” or “yyyy-mm-dd”.

Output:

DAY in MySQL is an important function to get the day of a specified date.

You Might Interested In

Leave a Reply

Enclose a code block like: <pre><code>Your Code Snippet</code></pre>.