cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Level 8

Getting Week Start and End Dates from Week Numer

Hi hi, 

 

I have an app connected to a sharepoint list. 

In the list there is a calculated column to derive the week number from a date. (European dates, thus week starting on Monday)

Here is the formula: 

=INT(([datecolumn]-DATE(YEAR([datecolumn]-WEEKDAY([datecolumn]-1)+4);1;3)+WEEKDAY(DATE(YEAR([datecolumn]-WEEKDAY(datecolumn-1)+4);1;3))+5)/7)

Credit to this site for the formula: Calculated Column Week Number

What I now need in Powerapps, is to get the Start and/or End dates of a week from the week number.

So I have a label and a global variable: varWeekNo

If varWeekNo = 47

Then the label should read: "19-11-2018 - 25-11-2018"

Anyone want to take a stab at this, without using a separate database for all weeknumbers/dates?

Thanks!

2 REPLIES 2
Highlighted
PauwelsSven
Level 8

Re: Getting Week Start and End Dates from Week Numer

Hi,

 

Make 2 more variables?

1 StartWeek: DateColumn - Int(weekday(datecolum))

2 EndWeek: DateColumn + Int(7-weekday(datecolum))

 

Is this an option for you?

 

Regards.

kiwads
Level: Powered On

Re: Getting Week Start and End Dates from Week Numer

Hello , 

 I now have the same situation . Did you find a solution ? 

Thank you in advance !