Power Apps is a suite of apps, services, connectors, and data platforms that provide a rapid application development environment to build custom apps for your business needs. More Details https://docs.microsoft.com/en-us/powerapps/powerapps-overview.
The EOMonth function in PowerApps returns the last day of the month, a specified number of months before or after a given date. It is useful to move a Date/Time to the end of the month by adding zero months.
The General syntax is EOMonth(DateTime, NumberOfMonths ).
Reading this article, you can learn how to perform the EOMonth function in PowerFx using Microsoft Power Apps. Also, you will be able to learn about the Text box, Label control in the Power Apps environment.
Step 1. Open the URL https://powerapps.microsoft.com/en-us/ in the browser for Power Apps.
Create an account with your Organisation Mail ID and log in after logging into your Power Apps account.
![Mail ID]()
Step 2. First, Click Create (+ ) and Select Start with Page Design and Select Blank Canvas.
![Page Design]()
![Power App]()
Step 3. To test the power function, First Rename the Screen name as PAPFSCR.
![PAPFSCR]()
Save the App with the name as PAPFEOMonth.
![Save]()
Next, insert a Label control and set the Name and Text property as LblTitle and “EOMonth function in PowerFx using canvas App with Power Apps”.
![Text Property]()
Next, insert a Label control and set the Name and Text property as LblCurDate and "Current Date is''.
![Label control]()
Next, insert a Label control and set the Name and Text property as LblMAdd and "Number of Months to be added.
![LblMAdd]()
Next, insert a TextBox control and set the Name property to TxtMAdd.
![Name Property]()
Next, insert a Label control and set the Name and Text property as LblMSub and "Number of Months to be sub''.
![Insert]()
Next, insert a TextBox control and set the Name property to TxtMSub.
![TextBox Control]()
Insert a Button control and set the Name property as Calculate and the OnSelect property as.
UpdateContext({
AddMonDate: Text(
EOMonth(Today(), Value(TxtMAdd.Text)),
"[$-en-US]mm/dd/yyyy"
)
});
UpdateContext({
SubMonDate: Text(
EOMonth(Today(), Value(TxtMSub.Text)),
"[$-en-US]mm/dd/yyyy"
)
});
![UpdateContext]()
Next, insert a Label control and set the Name and Text property as LblMaddRes and “After added Month with Last Day of the Month:" &AddMonDate.
![Text label]()
Next, insert a Label control and set the Name and Text property as LblMSubRes and "After Subtracted Month with Last Day of the Month:" &SubMonDate.
Finally, save the App PAPFEOMonth and the form design looks like below.
![Design]()
Step 4. Now we can see the run your App in Power Apps Studio, and the output of the PAPFEOMonth is.
![Apps Studio]()
The Browser Display is, after entering the added month and subtracted month, and clicking the calculate button.
![Calculate button]()
The Apple iPhone Display is,
![Apple iPhone]()
The Tablet Display is,
![Tablet Display]()
Now, you have successfully tested the Power Fx – EOMonth function in the Power Apps Studio environment.