This seems to be so simple, but can't figure out how to make it happen. Have a date field that I want to format conditionally when the current month is the prior month of the date field.
[ dt = Self // date field that gets the Conditional formatting.
; cd = Get ( CurrentDate )
]; If (Date ( Month(cd) + 1 ; 1 ; Year(cd) ) = Date ( Month(dt) ; 1 ; Year(dt) ) ; 1 ; 0 )
// this uses the first day of the month to compare month and year for the two dates
// If the CurrentDate is one month behind the field, then this is true
Do you ONLY need to compare if your field is 1 month ahead or do you need to compare if year is "future" (any date greater than the current date)? The calculation could be different...
This is a Due Date field. Just want to format it in a list to get attention since testing needs to be accomplished by the end of the Due Date month. Will see if I can get your suggestion to work. I already have it formatted to show red when current month is same as Due Date month.
Works perfect. Thanks a lot. Been racking my brain for 2 hours, reading, testing, etc. Nothing I tried would worked.
Retrieving data ...