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?
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.