Apr 21 2022 08:49 AM
I have the following issue in SharePoint List:
I have a column name SalesWeek and I want to show in another column named "WeekNB" the week number.
In short show 4/21/2022 in Salesweek as week 17 column WeekBN
Apr 21 2022 10:04 AM - edited Apr 21 2022 10:06 AM
@Gogi_Putkaradze you can do this with the following formula. Change Alert to Salesweek:
=INT((Alert-DATE(YEAR(Alert),1,1)+(TEXT(WEEKDAY(DATE(YEAR(Alert),1,1)),"d")))/7)
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
Jan 04 2023 08:42 AM
Hey, Ive been using this formula for a while now without issues. In 2023 the week number is off by 3 or 4 weeks. So data entered today is coming out to week #4. 12/31/2023 comes out to week #56. Im trying to find a solution that would keep the previous years data accurate and work for 2023 as well.
=INT(([Completion Date]-DATE(YEAR([Completion Date]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Completion Date]),1,1)),"d")))/7)
Jan 05 2023 04:02 PM
@Lev_Kr my network operations team was able to fix the same problem using this code. We are in SP2016, with on prem servers.
=CONCATENATE(TEXT(IF(INT(([Work date]-DATE(YEAR([Work date]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Work date]),1,1)-1),"d")))/7)=0,52,INT(([Work date]-DATE(YEAR([Work date]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Work date]),1,1)-1),"d")))/7)),"0"))
Jan 18 2023 11:08 AM
Jan 20 2023 07:20 AM
Jan 30 2023 08:40 AM
Jan 30 2023 11:59 AM
Feb 10 2023 02:57 PM
Feb 10 2023 02:58 PM