whitz11
whitz11

Reputation: 229

conditional formatting by date

I have the following table in my report

Address           SeenDate    

stack street      2015-01-02          
over lane         2016-03-15
flow way          2017-05-12  

I would like to highlight addresses in green that have got a 'SeenDate' within 12 months, I think this will need to be a rolling 12 months. So from the table above 'flow way' will be highlighted in green.

Upvotes: 1

Views: 1494

Answers (1)

iamdave
iamdave

Reputation: 12243

To do a conditional on your date value to highlight records that are within 12 months of the report execution date, you can compare the date value with a year ago from today using iif in the Fill expression of the textbox:

=iif(Fields!SeenDate.Value >= Today().AddYears(-1), "Green", "Red")

Also a note to add that Today gives you the date for today and Now gives you the date and time of right now, depending on how precise you want to be.

Upvotes: 3

Related Questions