Skip to main content

Notifications

Power Automate - Power Automate Desktop
Suggested answer

Fill the year week day in a sharepoint column

(0) ShareShare
ReportReport
Posted on by 4
Good morning,
 
In sharepoint I have a list with several columns, one of them is a date field. I would like to, in another column, say "Weekday" get the year weekday for that date. I have tried several ways, but can't get it. Do you know a formula that can do it? or any other way? I have even tried to create a list with all the dates of the year and its weekdays and compare the date on the triggerbody "when an item is created or modified" and then compare it with the date in the list but it never finds a likeness
 
I'm relly out of ideas.
 
Can anyone help me?
Categories:
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,076 on at
    Fill the year week day in a sharepoint column
    Hi,
     
    well i found a way to do this, used a mathematical formula to acheive this !
     
    see below
     
     
    Here i am passing the date in a variable - date1, and next i am using a compose action to write the expression to get the weeknumber.
     
    Expression used is
    div(add(dayOfYear(variables('date1')),add(mul(add(dayOfWeek(concat(formatDateTime(utcNow(),'yyyy'),'-01-01')),1),-1),10)),7)
     
     
    See whether this can help u !
     
    Mark it as solution if it resolves your query !
     
    Thanks & Regards,
    Nived N
     
  • RS-18101147-0 Profile Picture
    RS-18101147-0 4 on at
    Fill the year week day in a sharepoint column
    Hi, sorry if I didn't explain myself, I have a column in a sharepoint list and I need to have another column with the weekyear of that date, I mean, for example, for the date 10/11/2024 (spanish date form dd/mm/yyyy) I want to obtain in a column like "weekday" the value 46, wich is the weekyear number for that date.
     
    Can anyone help me? I have tried all this formulas in a calculated column, but they don't work:
     
    =INT((TODAY()-DATE(YEAR(TODAY());1;1)+(TEXTO(WEEKDAY(DATE(YEAR(TODAY());1;1));"d")))/7)-INT((Fecha-DATE(YEAR(Fecha);1;1)+(TEXTO(WEEKDAY(DATE(YEAR(Fecha);1;1));"d")))/7)
    =INT(([Fecha] - DATE(YEAR([Fecha]); 1; 1) + WEEKDAY(DATE(YEAR([Fecha]); 1; 1); 2)) / 7) + 1
    =INT(([Fecha] - DATE(YEAR([Fecha]); 1; 1) - WEEKDAY(DATE(YEAR([Fecha]); 1; 1) - 1) + 7) / 7)
    =INT(( [Fecha] - DATE(YEAR([Fecha]); 1; 1) - WEEKDAY(DATE(YEAR([Fecha]); 1; 1) - 1) + 11) / 7)
    =INT(([Fecha]-DATE(YEAR([Fecha]),1,1)+(weekdayDate(YEAR([Fecha]),1,1)),"d")))/7)
    =INT(([Fecha]-DATE(YEAR([Fecha]);1;1)+(TEXT(WEEKDAY(DATE(YEAR([Fecha]);1,1));"d")))/7)
    =CONCATENATE(TEXT(IF(INT(([Fecha]-DATE(YEAR([Fecha]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Fecha]),1,1)-1),"d")))/7)=0,52,INT(([Fecha]-DATE(YEAR([Fecha]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Fecha]),1,1)-1),"d")))/7)),"0"))
     
    I have also tried a power automate flow using another list  with all the dates of 2024 and besides its weeknumber, but when I try a for each loop it becomes ethernal or simply doesn't work
     
    Thanks a lot
  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,076 on at
    Fill the year week day in a sharepoint column
    did you meant by year weekday by whether it is Monday, Tuesday etc for given date?
     
    May be i am bit confused ?
     
     
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard