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 / Status TimeStamp exclu...
Power Automate
Unanswered

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

 

Categories:
I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    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

  • Victor1e Profile Picture
    16 on at

    Thank you so much that worked!!!!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard