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 exclud...
Power Apps
Answered

Date Difference excluding Weekends

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

If I want to calculate difference between two dates excluding weekend(Saturday, Sunday). How to achieve this? Suggest some help.

Categories:
I have the same question (0)
  • hngdev Profile Picture
    304 on at

    I think you can you use DateDiff function to do so:

    - Use DateDiff with day unit > get days

    - Use days to get weeks

    - Multiply weeks by 2 for weekends

    - Get days minus weekends

    Hope it helps

  • Verified answer
    Steelman70 Profile Picture
    873 on at

    Here is the screenshot and formulas for each line below, frankly it should be possible to simplify but I could not see how...

     

     

     

    CaptureWeekDays.PNG

     

    Date(2016,6,15)

     

    Date(2016,6,27)

     

    DateDiff(DateValue(Date1.Text, "it" ), DateValue(Date2.Text, "it" ))

     

    Mod(CalDays.Text,7)

     

    Mod(DateDiff(Date(2000,1,3), DateValue(Date1.Text, "it" )),7)+1

     

    Weekday1.Text+CalDaysMod7.Text

     

    If(CalDaysMod7.Text="0",0, If(Value(Weekday2x.Text) < 7, CalDaysMod7.Text, If(Weekday2x.Text="7", Max(CalDaysMod7.Text-1,0), CalDaysMod7.Text-Min(2,8-Weekday1.Text))))

     

    RoundDown(CalDays/7,0)*5+ExtraDays

    Basically it is whole weeks*5 plus an adjustment for the extra days depending on how many week-end days they include

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the post.It's working great!!!!!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard