Any ideas on script which can calculate this date? First Friday date in two months from today, for example:
Input: 08-04-2021 (+2 months) it can be any date
08-06-2021 (getting first Friday of June)
I was planning to use 'Compose' to create some script, but nothing worked as expected.
I would appreciate any suggestions.
Solved! Go to Solution.
Expressions used from top to bottom:
action: todayPlusTwoMonths addToTime(utcnow(), 2, 'Month') action: select from: range(0,7) Date: addDays(outputs('todayPlusTwoMonths'), item()) DayNum: dayOfWeek(addDays(outputs('todayPlusTwoMonths'), item())) DayName: formatDateTime(addDays(outputs('todayPlusTwoMonths'), item()), 'ddd') action: First Friday first(body('Filter_array'))['Date']
Thank You Paulie78,
The script seems to be working, but I probably didn't describe my issue properly 😅
Script above gets the first Friday after 2 months from given date.
e.g. 08-04-2021 (+2months) -> 08-06-2021 (first Fri after this date) -> 11-06-2021
I meant first Friday of the month after 2 months from given date:
e.g. 08-04-2021 (+2months) -> 08-06-2021 (first Friday of June) -> 04-06-2021
Would that be more complicated?
Check out the new Process Advisor community forum board!
Check out new user group experience and if you are a leader please create your group
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.