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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date Difference (busin...
Power Apps
Answered

Date Difference (business days) in Power Automate

(0) ShareShare
ReportReport
Posted on by 56

my source is excel list, im trying to create a flow where an email will automatically sent when the due date is in 30 days. However, i only want to count the business days. How will I do this in power automate

Categories:
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PALQD 

    If you want to calculate the working days in flow , you can refer to this video:
    Calculating Working Days in Power Automate & Power Apps | #PowerAutomate #PowerApps #Tutorial - YouTube

     

    Best Regards,

    Yueyun Zhang

  • UshaJyothiKasibhotla Profile Picture
    229 Moderator on at
  • PALQD Profile Picture
    56 on at

    i only need the formula. i already have a flow of getting the date difference, but i can't figure out how to only compute for the weekdays. 

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PALQD 

    Do you get the start date and end date in your flow side?

    Best Regards,

    Yueyun Zhang

  • PALQD Profile Picture
    56 on at

    yes, 

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PALQD 

    I create a test flow and the result is as follows:

    vyueyunmsft_0-1715059791726.png

    I use the start date and the end Date in my trigger:

    vyueyunmsft_1-1715059814478.png

    The Select action:

    vyueyunmsft_2-1715059864455.png

    range(0, add(int(split( dateDifference(triggerBody()['date'],triggerBody()['date_1']) ,'.')?[0]),1) )

     

    addDays(triggerBody()['date'],item())

    addDays(triggerBody()['date'],item(),'dddd')

     

    【Note】: The "triggerBody()['date']" is the Start Date and the "triggerBody()['date_1']" is the End Date , you need to replace this expression in your side.

     

    The Filter and Compose action:

    vyueyunmsft_3-1715059996836.png

    @and(not(equals(item()?['Day'], 'Saturday')) ,not(equals(item()?['Day'], 'Sunday')) )


    length(body('Filter_array'))

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • PALQD Profile Picture
    56 on at

    im confused but here is my flow. What should I do

    PALQD_0-1715061280451.pngPALQD_1-1715061544588.png

     

  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PALQD 

    According to your screenshot, this is my understanding:

    vyueyunmsft_0-1715061856825.png

     

    So you need to add a condition and  Select action after your Compose 4 action:

    vyueyunmsft_1-1715062302479.png

    range(0, add(outputs('Compose_4'),1) )
    addDays(outputs('Compose_3'),item())
    addDays(outputs('Compose_3'),item(),'dddd')

     

    Then after the Select 2 action you need to add a filter and Compose action in my above reply:

    vyueyunmsft_2-1715062360388.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • PALQD Profile Picture
    56 on at

    After the compose step, Can u teach me what to do next. I want to send email when the counted date difference (business days) reaches 30. 

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PALQD 

    The  final Compose is to calculate the number of workdays to be included, so you can add a condition directly below. If it is greater than or equal to 30, the email will be sent.

    vyueyunmsft_0-1715063361091.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard