Forum Discussion

JimHarrison's avatar
JimHarrison
Qrew Champion
2 days ago

Setting Default Report Row Colors based on Date Modified

I just spent several hours trying to come up with a creative solution to a problem. We want a record where the Date Modified is on or before a specific Date to have a different color, in this case grey.

Easy we thought, this should work. - It doesn't. 
If(ToDate([Date Modified])=ToDate(6/22/21),"#666666","")

Tried to add a formula check box field to get an idea what was happening.

Check box field namd [Date Formula]:
Part(ToText([Date Modified]),1, " ") this works when used in the color formula.

Then in the Default report in the Color formula: - kinda seems to work but not really. 
If([Date Formula],"#666666","")

Tried this one and no luck
If(Part(ToText([Date Modified]),1, " ") < "06-22-23","#666666","")

I asked ChatGPT and this came out:
If([Date Modified] <= ToTimestamp(Date(2021, 6, 23)),true,false)

So I was trying my best to convert Date Modified to a Date and failing. Instead by converting the static date I wanted to use as my filter to a Timestamp everything fell into place. 

Leaving this here because I couldn't find anything similar. Please let me know if there is a solution already in this forum and I will link it here.

2 Replies

  • Try this human chat GPT

     

    If(ToDate([Date Modified]) <= Date(2025, 6, 23 ),"#666666")

  • Ha! Thanks Mark. Yeah afterwards I was talking with a coworker and he said the same thing. Make the static date 2025,6,23 into a date data type.

    I wonder if there is any difference between the two results?