Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Status TimeStamp excludes weekends

(0) ShareShare
ReportReport
Posted on by 16

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.

Victor1e_0-1675984221013.png

 

  • Victor1e Profile Picture
    16 on at
    Re: Status TimeStamp excludes weekends

    Thank you so much that worked!!!!

  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at
    Re: Status TimeStamp excludes weekends

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow