Hello,
I’m capturing a follow-up time stamp in a SharePoint list based on a specific column status. I got as far as adding three days to the current time by using ‘addDays’ and ‘utcNow’ functions, but in the case of a Thursday or Friday status update, the timestamp is not excluding Saturday/Sunday. I also tried capturing the day of the week and adding two more days if the request is updated on Thursday or Friday but it’s not working as expected. Any guidance you can provide will be greatly appreciated.
This is my formula:
if( equals(dayOfWeek(addDays(utcNow(),3)),'4'),addDays(utcNow(),5),if( equals(dayOfWeek(addDays(utcNow(),3)),'5'),addDays(utcNow(),5),addDays(utcNow(),3)))
Below is an image from my SharePoint List, since I updated the status to vendor contacted on 2/9, I am expecting three days to be added to the current time, but the result is falling on a Sunday 2/12. I need to exclude Saturday and Sunday, so the result should be 02/14/2023.
Thank you so much that worked!!!!
Hi @Victor1e ,
Do you want to add three days to the current date but exclude Saturday and Sunday?
In fact, what we need is to determine whether today is Wednesday, Thursday or Friday. If it is one of these three days, we will add 5 days to the current date, and if not, we will only add three days.
please try:
if(not(or(equals(dayOfWeek(utcNow()),3),equals(dayOfWeek(utcNow()),4),equals(dayOfWeek(utcNow()),5))),addDays(utcNow(),3),addDays(utcNow(),5))
Best Regards,
Dezhi
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional