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 / set value in calendar ...
Power Apps
Answered

set value in calendar excluding weekend

(0) ShareShare
ReportReport
Posted on by 59

Hello Everyone,

I have requirement to display value 1 in calendar and where Saturday and Sunday then display 0 ,

I have 2 Date Picker control Datepicker1 and Datepicker2

demo099_2-1655463877441.png

when Select date between them then set value 1 in label as below

demo099_1-1655463846239.png

Now when I select date between 2 date picker then set value 1 but it also include Saturday and Sunday,

but I want to Exclude Saturday and Sunday and set value 0 at that specific Saturday/Sunday date.

this task in high priority, so please anyone help me with this.

 

Categories:
  • Verified answer
    theapurva Profile Picture
    970 Super User 2024 Season 1 on at

    Please add below condition where you are putting 1 or 0 in calendar

    Weekday(YourDate)=1 ||Weekday(YourDate)=7
    
    Your Formula will look like
    
    If(Weekday(YourDate)=1 ||Weekday(YourDate)=7,0,1)
  • Dynatech123 Profile Picture
    59 on at

    Hi @theapurva ,

    Thanks for your suggestion it's Work Perfectly,

    Now you have any idea how can we include last Saturday of month  in your suggested code,

    please can you help me with this also

  • Verified answer
    theapurva Profile Picture
    970 Super User 2024 Season 1 on at

    This formula returns true if day is last Saturday of month,

    Weekday(YourDate)=7&&(DateAdd(YourDate,7,Days))=Month(YourDate)

     

    so your formula would look as below:

     

    If(Weekday(YourDate)=1 ||(Weekday(YourDate)=7&&(Month(DateAdd(YourDate,7,Days))=Month(YourDate))),0,1)

     

     

  • Dynatech123 Profile Picture
    59 on at

    Hi @theapurva ,

    Thank you for your quick response,

    your suggested code work perfectly for me 

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard