What is the purpose of the month function in MySQL?

In MySQL, the MONTH() function is used to extract the month part from a date. Its syntax is as follows:


The function returns an integer between 1 and 12, indicating the month of the given date expression. For example, for the date ‘2021-09-15’, the MONTH() function will return 9.

Leave a Reply 0

Your email address will not be published. Required fields are marked *