How can I have an "expiration date" field highlight red when past the listed date

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I am trying to have a field turn red when the current date is past the listed date.  Field is listed as [COI: Exp Date].  Any help is greatly appreciated.


Photo of Joshua

Joshua

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 5,030 Points 5k badge 2x thumb
You cannot make a date-field change color.

You CAN make a row display in color in a report.

You CAN create a formula-text field that will display a DATE field in a color.

Your formula would be:

If([Date Field] < Today(),"<div style=\"color:red;background-color:yellow;font-size:100%;\"> "& [Date Field] & "<div>","")
Photo of Joshua

Joshua

  • 0 Points
Thank you! The code worked for what I needed.  I simply added the formula field right after the field in question and it auto populates as a red font with yellow background when the item expires.   I appreciate the help Laura.