You are right that both of these generate the same answer. I also had this question so I looked up for MySQL reference manual and a book by Sumita Arora :"Informatic Practices for class 12", and it is clearly stated in each of the them that DAY()
and DAYOFMONTH()
are synonyms to each other and are used to display the date in range 1 to 31(If you enter a date such as 2024-00-00 or 0000-00-00 then you will get 0 as your output).