and make sure that your field is of type date, not text.
Hmmm, this has the exact opposite effect: now all the dates are red and bold.
I checked and the renewal field is marked date + indexed.
I have a script that updates the date to the next year automatically if the date for this year has already passed, but that only runs when I go to a different layout.
Not sure what's wrong here.
The dates are in this format: 3/21/2012.
It works for me, Dates more than 30 days in the past do not change color/style and dates 30 days in the past on through dates in the future appear in red.
but I think you need a more complex expression and I don't know if "within 30 days" means 30 days into the past or 30 days into the future.
One of the following is more likely to be what you want here.
Self < Get ( CurrentDate ) and Self > ( Get ( CurrentDate ) - 30 ) // dates up to 30 days in past
Self > Get ( CurrentDate ) and Self < ( Get ( CurrentDate ) + 30 ) // dates up to 30 days in future
Right, playing around with a play DB, this is what did what I wanted:
self-Get(CurrentDate) > 0 and self-Get(CurrentDate) ≤ 30
It's working now.
Thanks again! :)