Conitional formatting - Dates
I am trying to work out the formula for conditional formatting the changes text colour in a date field from Black to Red if the date value within the field is greater than 12 months old.
Year ( Get ( CurrentDate ) ) > Year ( YourTable::yourDateField )
Try calculation, result is number of: Date ( Month ( theDate ) + 12 ; Day ( theDate ) ; Year ( theDate ) ) < Get ( CurrentDate )
You must set the Storage Options to 'do not store calculation results' so it will update according to the current date.
Since this is a conditional format expression, we don't need worry about storage options.
I was thinking of regular calculation field. I didn't explain how to apply the conditional formatting either.
BTW, Year ( Get ( CurrentDate ) ) > Year ( YourTable::yourDateField ) won't be accurate to month/day. For instance:
If the current date is 3/15/2011 and the date in the field is 12/31/2010, your calc will say it is a year old (12 months old) when actually it won't be. The full date needs to be taken into account.
yep, which is why I didn't say anything about that part of your post.
You're suggesting a calculation field for this? I don't see the advantage over just putting your calculation directly into the conditional format expression, but then I've been wrong before...
Retrieving data ...