cancel
Showing results for
Did you mean:
Frequent Visitor

## Week Number to Monday Date

Hi PowerApps Users!

I am trying to find Monday's Date based on a week number.

I am currently making an app in which my company can automatically assign a Monday due date to a toolbox talk (pdf).

I was able to connect my document library to the app and have assigned each with a particular week number. It is then filtered based on the current week number that is calculated from the Today() function.

Do you know how this would be possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

I've done this formula from scratch, but it SHOULD work. Tested it by using multiple week numbers for the 2021 calendar and all tested returned correct date of that monday. It is limited to week numbers for current year, if you got into doing ones for future years it could still work but would need additional steps to calculate what they year selected was first.

In following code TextInput4.Text is where my week number is stored.

``DateAdd(Date(Year(Today()),1,1),Value(Sum(Sum(Value(TextInput4.Text)-1)*7,7-(Value(Weekday(Date(Year(Today()),1,1)))-1)))+1,Days)``
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
3 REPLIES 3
Super User

I've done this formula from scratch, but it SHOULD work. Tested it by using multiple week numbers for the 2021 calendar and all tested returned correct date of that monday. It is limited to week numbers for current year, if you got into doing ones for future years it could still work but would need additional steps to calculate what they year selected was first.

In following code TextInput4.Text is where my week number is stored.

``DateAdd(Date(Year(Today()),1,1),Value(Sum(Sum(Value(TextInput4.Text)-1)*7,7-(Value(Weekday(Date(Year(Today()),1,1)))-1)))+1,Days)``
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Frequent Visitor

This worked perfectly. Thank you so much!

Frequent Visitor
• Set(varFirstDayOfMonth;Date(Year(Today());Month(Today());1))
• WeekNum(Date(Year(varFirstDayOfMonth);Month(varFirstDayOfMonth);Day(varFirstDayOfMonth)-1-Weekday(varFirstDayOfMonth;StartOfWeek.Monday));StartOfWeek.Monday)

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA