Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

day() vs dayofmonth() in mysql

Tags:

mysql

Consider

select day("2016-05-22")

and

select dayofmonth("2016-05-22")

both gives the same output.

day("2016-05-22")
22

and

dayofmonth("2016-05-22")
22

Is there any diffrence between these two methods?

like image 775
Jeeva Balan Avatar asked Oct 25 '25 07:10

Jeeva Balan


1 Answers

According to the MySQL reference manual DAY() is a synonym for DAYOFMONTH()

like image 141
Szeki Avatar answered Oct 27 '25 20:10

Szeki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!