Use the EOMONTH function to display the last date of the month in Excel. EOMONTH means 'end of month' and is specifically designed to return the last day of the corresponding month.
The syntax of the EOMONATO function is as follows:
EOMONTH(start_date, months)