web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Fill the year week day...
Power Automate
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?
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    did you meant by year weekday by whether it is Monday, Tuesday etc for given date?
     
    May be i am bit confused ?
     
     
     
  • RS-18101147-0 Profile Picture
    4 on at
    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
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    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
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard