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 / Calendar Bot for Holidays
Power Apps
Unanswered

Calendar Bot for Holidays

(0) ShareShare
ReportReport
Posted on by

Does anyone know if Power Apps can be used to calculate the next weekday after a holiday?

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Cjcolson 
    It would be pretty straightforward I think.

    Make a Collection of all your holidays like this.

    ClearCollect(colHolidays, [Date(2020, 1, 1), Date(2020, 4, 3), Date(2020, 12, 25)])

     

    I assume you are selecting a date from a DatePicker.  This code would add 1 day to the DatePicker today.

    If(DatePicker1.SelectedDate in colHolidays.Value, DatePicker1.SelectedDate + 1, DatePicker1.SelectedDate)

     

    If this wasn't what you wanted to know, please provide more details than just one sentence!

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Joel CustomerEffective Profile Picture
    3,224 on at

    so it would depend on how you want to do it. For example, Weekday(DatePicker1.SelectedDate) will get you the numerical day of the week for a selected date

     

    So if I feed it December 25, 2020, it gives me 6.

     

    So if you want the next day of the week after a holiday, you could set the default date of another date field to

    DatePicker1.SelectedDate+1

    If by week date you mean next working date, you would have to define what your workplace rules are. 

    For example, could be something like this if you say that if a holiday happens on on Friday-Sunday, the next weekday should be Monday:

    If(
     Weekday(DatePicker1.SelectedDate) < 8,
     DatePicker1.SelectedDate + 1,
     If(
     Weekday(DatePicker1.SelectedDate) > 5,
     DatePicker1.SelectedDate + 2
     )
    )

     

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 239

Last 30 days Overall leaderboard