The EOMonth function in Power Apps returns the last day of the month for a given date, with an option to shift the result by a specified number of months.
It is useful when working with month-end data, financial reports, or due dates.
Syntax:
EOMonth(StartDate, Months)
- StartDate: Required. The starting date from which the calculation is based.
- Months: Required. The number of months to shift from the starting date. Use positive numbers to move forward and negative numbers to move backward and zero changes the day portion of the input DateTime to the end of the month.
Examples:
Getting End of Current Month
If you want to get the last day of the current month based on a given date, you can pass 0 for the number of months to shift.
Following formula returns the last day of the current month based on today’s date.
EOMonth(Today(), 0)

Getting the last day of the month for 2 months from now
To calculate the last day of a future month, you can use the Months argument to add the desired number of months to the starting date.
EOMonth( Â Today(), 2 )

Getting the last day of the month for 2 months ago
To calculate the last day of a past month, you can use the Months argument to substract the desired number of months from the starting date.
EOMonth( Â Today(), Â - 2 )
The formula uses the EOMonth to calculate the last day of the month that is two months prior to the current date.
If today is October 15, 2024, the formula will calculate the last day of August 2024, which is August 31, 2024.

When to use EOMonth
- When you need to identify the last day of a month relative to a specified date, whether it’s in the future or the past. This is especially important for reporting and financial calculations.
- If you generate monthly reports, using EOMonth can help you identify the end date of the reporting period easily.
- If you need to adjust a date to ensure it aligns with the end of a month, whether you’re adding or subtracting months, EOMonth provides a straightforward way to do that.
Also Read..
![]()
