I would like a flow to get what the next Monday's date is at the time of running... so if it ran today 7/2/2019 it would return 7/8/2019, if it ran on 7/4/2019 it would return 7/8/2019... if it ran 7/8/2019 it would return 7/15/2019... etc.
The future date command seems like it would be good if you knew your starting day and could calculate somehow when the next Monday would be.
I'm going to keep playign around with it, see if I can use the Excel type commands to get to this... but wanted to post here in case someone already knew.
Thanks,
Terry
Also if anyone needs to get the date of the next monday, tuesday, friday, saturday... etc. Then you can use this example flow to continually get the date of any upcoming day of the week
https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Get-Next-Date-s/td-p/2581331
Hi @Mattw112IG ,
Please try following expression to get next monday:
addDays(utcNow(),if(equals(dayOfWeek(utcNow()),0),1,sub(8,dayOfWeek(utcNow()))),'yyyy-MM-dd')
Image reference:
Hope it helps.
Best Regards,
Hi @Mattw112IG
Please see the flow sreenshot below:
You could use a nested If condition (or just a sequential one too).
Here I am getting the day of the week using the expression:
dayOfWeek(utcNow())
this returns an integer 0-Sunday, 1-Monday etc,
Then I am comparing this with the particular day and based on that setting the variable to the date for the next monday by adding days to it. Expression:
formatDateTime(addDays(utcNow(),1),'MM/dd/yyyy')
This adds a day to the UTCnow if today is sunday and similarly we can do that for all the days.
It is a lengthy process but works.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional