web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get a future da...
Power Automate
Unanswered

How to get a future day's date

(0) ShareShare
ReportReport
Posted on by 1,088

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

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

  • Verified answer
    v-bacao-msft Profile Picture
    on at

    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,

  • takolota1 Profile Picture
    4,974 Moderator on at

    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 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard