Skip to main content

Notifications

Community site session details

Community site session details

Session Id : y7uV+JsZBW2cAcvehbd/FS
Power Automate - Using Flows
Answered

To compute the coming Friday's date

Like (0) ShareShare
ReportReport
Posted on 29 Jul 2019 01:51:21 by 274

Hi Flow Users, I'm working on a Flow that help in a weekly report generation in SharePoint. I would need to append the coming Friday's date to the report name. The report generation can be triggerred on a Monday or a Tuesday. E.g. If a trigger the report generation flow today (29/07/2019), then i need to append a coming Friday's date to the file name, i.e. 02/07/2019. Any help appreciated. Thanks, Kevin

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 19 Feb 2022 at 00:25:58
    Re: To compute the coming Friday's date

    How to get the date of the next upcoming day of the week.
    Choose a day of the week, ex: 5 for Friday, and get the date of the next Friday starting from utcnow().

     

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Date-of-Next-Chosen-Day-of-Week/td-p/1466540

     

    I often see requests for timing things a certain time on a certain day of the week and people respond with an expression formula for that person’s requested day of the week and only their requested day of the week. With this, we shouldn’t need to find a different formula for each day.

  • Verified answer
    RezaDorrani Profile Picture
    12,141 on 29 Jul 2019 at 16:30:47
    Re: To compute the coming Friday's date

    Hi @kevingeorget 

     

    Try this

    Since Friday is always going to be the 5th day of the week

     

    We can first do a check to see if todays day is before coming Friday

     

    Condition

    sub(5,dayOfWeek( utcNow())) greater than 0
     
    If Yes - 
    addDays(utcNow(),sub(5,dayOfWeek( utcNow())))   - should give you Friday's date
     
    If No - 
    addDays(utcNow(),add(sub(5,dayOfWeek( utcNow())),7))  - should give you Friday's date

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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,089 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow
Loading started