The Get current date time action retrieves the current date and stores it in a date time variable called %CurrentDateTime%.
A variable of type date time has a property called .Day which is a numeric value of the day of the month. So, if the %CurrentDateTime% is the 13th of July 2023, %CurrentDateTime.Day% will be equal to 13.
The Add to date time action allows adding numeric values of various intervals to a date variable. Adding -%CurrentDateTime.Day% days to %CurrentDateTime% will always result in the last day of the previous month. You are effectively deducting (because of the minus) 13 days from the 13th of July, so that will result in the 30th of June.
We then store that in a different variable (such as %EndOfLastMonth%) and use that variable again in another Add to date time action. We use the same operation, but deduct 1 less day, so that we end up with the first of the month, instead of the last of the month before last month. So, adding -%EndOfLastMonth.Day-1% (note the -1 there) days to %EndOfLastMonth% will effectively deduct 29 days from the 30th of June, resulting in the 1st of June.
This is a standard flow that will always work, regardless of the month in question and regardless of the current date.
The last steps are just formatting the two dates in a specific format that you requested and putting them into a single string separated by an ampersand.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution.
If you like my response, please give it a Thumbs Up.
If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/