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 / Conditional color change
Power Apps
Answered

Conditional color change

(0) ShareShare
ReportReport
Posted on by 9

I have tried but can not get this formula right.

Can someone tell me how to change a color of font based on data criteria.

I want to change the color of an edit box font if the date is older than 3 years. I have attached the form I use.

Thank you.

EditCard.jpg
Categories:
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @KeithG 

     

    You can update the expression on "Color" property of the Date Picker to:
    If(DatePicker1.SelectedDate < DateAdd(Today(),-3,Years),Red,RGBA(0, 0, 0, 1))
     
    Here, DatePicker1 is the name of Date Picker control.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • KeithG Profile Picture
    9 on at

    Sorry I meant Date Criteria

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @KeithG 

     

    Can you share more details about this? Maybe through an example of the usecase? I am not getting what you mean by Date Criteria.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • KeithG Profile Picture
    9 on at

    Perfect! 

    Thank You. I spent hour and you helped in seconds.

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard