Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

How to get a future day's date

Like (0) ShareShare
ReportReport
Posted on 3 Jul 2019 00:00:23 by 1,082

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

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 18 Feb 2022 at 05:57:59
    Re: How to get a future day's date

    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 

  • Verified answer
    v-bacao-msft Profile Picture
    on 03 Jul 2019 at 03:09:45
    Re: How to get a future day's date

    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:

    21.PNG

    Hope it helps.

     

    Best Regards,

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on 03 Jul 2019 at 02:26:15
    Re: How to get a future day's date

    Hi @Mattw112IG 

     

    Please see the flow sreenshot below: 

     

    You could use a nested If condition (or just a sequential one too). 

    days.PNG

     

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started
Loading started
Loading complete