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 / Check for holiday igno...
Power Apps
Answered

Check for holiday ignoring the year

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a holiday in my collection on 2/11/1947. If i check for this holiday on 2020 it wont appear as a holiday. 


I set a label with text property 

 

If( Text(DateValue("2020/2/11"), "[$-en-US]mm/dd") in HolidaysCollection.StartDate, "Holiday", "Not Holiday" ) . The result was "Not Holiday"

 

How can i recognize a holiday regardless the year? 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Try this

     

    If(IsBlank(LookUp(HolidaysCollection,
    Text(DateValue("2020/2/11"), "[$-en-US]mm/dd") = Text(DateValue(StartDate), "[$-en-US]mm/dd")
    )),
    "Not Holiday", "Holiday" ) 

     

     ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    I made a collection like this

    ClearCollect(
     HolidaysCollection,
     {StartDate: Date(2020,02,11)},
     {StartDate: Date(2020,01,29)},
     {StartDate: Date(2020,02,08)},
     {StartDate: Date(2020,03,03)}
    )

     

    And then I put this code in the text property of a label

    If(DateValue("02/11/2020") in HolidaysCollection.StartDate, "Holiday", "Not Holiday" )

     

    It displayed "Holiday"

     

    ---
    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."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Tried this and it doesnt work. For every DateValue it will always display "Holiday". I changed DateValue("2020/2/11) to DateValue("2020/2/13) and appears as a holiday even if its not

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    I made a small tweak quickly after my initial post. Double check that your formula is the one that is posted above now. It's working on my end.

    If(IsBlank(LookUp(HolidaysCollection,
    Text(DateValue("2020/2/11"), "[$-en-US]mm/dd") = Text(DateValue(StartDate), "[$-en-US]mm/dd")
    )),
    "Not Holiday", "Holiday" ) 

     

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard