Hello everyone,
I am trying to set specific date ranges in Power Automate Desktop based on the current date. Specifically, I want to:
- Set inicio1 to the start date of the previous month.
- Set fim1 to the end date of the previous month.
- Set inicio2 to the start date of the current month.
- Set fim2 to the current date.
In other platforms, I would typically use the following logic:
SET inicio1 TO formatDateTime(startOfMonth(addMonths(utcNow(), -1)), 'dd/MM/yyyy')
SET fim1 TO formatDateTime(endOfMonth(addMonths(utcNow(), -1)), 'dd/MM/yyyy')
SET inicio2 TO formatDateTime(startOfMonth(utcNow()), 'dd/MM/yyyy')
SET fim2 TO formatDateTime(utcNow(), 'dd/MM/yyyy')
However, I am having difficulty implementing this in Power Automate Desktop. Could someone guide me on how to achieve this or provide an alternative solution?
Thank you in advance for your assistance!