Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Calculate the week number of current date within a month

Like (0) ShareShare
ReportReport
Posted on 15 Nov 2021 14:48:03 by

Hi All,

 

Is it possible to calculate the current week number within a month? I know that 

add(div(dayOfYear(utcNow()),7),1) returns the week number within a year. What I want to know is how to return the week number within the month. For instance todays date 15th november should return Weeknumber = 2 since it is the second week of november.
Please let me know if there is a solution to get this.
 
Thanks
  • Community Power Platform Member Profile Picture
    on 17 Nov 2021 at 11:18:25
    Re: Calculate the week number of current date within a month

    This worked. Thankyou!

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 16 Nov 2021 at 09:53:33
    Re: Calculate the week number of current date within a month

    Hi @Anonymous,

    Do you want to get the week number of today?

     

    You just need to modify your formula as below:

    add(div(dayOfMonth(utcNow()),7),1)

    vqiaqimsft_0-1637056379782.png

     

  • mahoneypat Profile Picture
    1,720 on 15 Nov 2021 at 22:25:58
    Re: Calculate the week number of current date within a month

    Please try this expression

     

    formatNumber(div(dayOfMonth(utcNow()),7), '0')
     
    Pat

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