Name

DAY()

Synopsis

DAY(date)

Returns the day of the month for date, in the range 1 to 31 or 0 for dates that have a zero day part such as “0000-00-00” or “2010-00-00”. You can also use the function DAYOFMONTH to return the same value. This code returns the value 3:

SELECT DAY('2001-02-03');

Get Learning PHP, MySQL, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.