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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / comparing only day an ...
Power Apps
Answered

comparing only day an month

(0) ShareShare
ReportReport
Posted on by 149

Hi all,

 

I have a date column in a sharepoint list. I want to check people's birthday and then do something with that. Eg, change the display color of the birth day to red.

 

But off course I only need the day and month. How do I write an expression to compare the day and month to todays date?

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Can you clarify, are you wanting to change its color in sharepoint, or in powerapps. and if in powerapps how are you currently displaying your data in powerapps, control type etc

     

  • StefWS Profile Picture
    149 on at

    Hi @TheRobRush . Thanks for your assistance.

     

    It is a text box that displays the date like this :

    Text(DateValue(gallery.Selected.SPColumnName),"dd/mm")

     

    I want to show this text in a different color (in PowerApps!) when the day and month matches today's day & month.

     

    The SP Column is date column without time.

     

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Ok so I placed a gallery in a test app just to show you how it works in a gallery, may need to edit slightly to match your needs but here goes.

     

    My gallery has a items value of

    CoachingDatabase

    which is just a random splist i have with dates in it so chose that

     

    Title box in that gallery has text value of

    Text(DateValue(ThisItem.DATE),"dd/mm")

    and a color value of

    If(
     And(Day(ThisItem.DATE)=Day(Today()), Month(ThisItem.DATE)=Month(Today())), Red, Green)

     

    which results in the following, where every date that matches today shows in red, and otherwise date is green

    TheRobRush_0-1668800890100.png

     

     

     

  • StefWS Profile Picture
    149 on at

    Wow @TheRobRush !! Thanks, that worked like a charm and I'm super happy with it. Glad to end my week like this!! Kudos!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard