Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Help - How to get last week's number from date in Power Automate?

Like (1) ShareShare
ReportReport
Posted on 10 Feb 2025 11:38:19 by 11
Help - How to get last week's number from date in Power Automate?
  • Suggested answer
    CU10021113-0 Profile Picture
    11 on 10 Feb 2025 at 19:28:22
    Help - How to get last week's number from date in Power Automate?
    Thank you very much, solve my problem!
  • Verified answer
    Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 10 Feb 2025 at 12:08:28
    Help - How to get last week's number from date in Power Automate?
     
    You can calculate it with an expression. Ryan Maclean has for example shared a blog about this.
     
    In your case you want to change that expression to sub 1 week from the UtcNow (Today's date).
     
    Below is an example based on ISO 8601 week numbers 
    That should return 6 today
     
    sub(div(add(dayofyear(addDays(subtractFromTime(utcNow(), if(equals(dayofweek(utcNow()),0),6,sub(dayofweek(utcNow()),1)), 'Day'),3)),6),7), 1)
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
     

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 > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 18 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 16

#3
Churchy Profile Picture

Churchy 12

Overall leaderboard
Loading started
Loading started