Search code examples
sqlssrs-2008indicatorssrs-expression

SSRS indicator To show if date is updated either today or yesterday


I have a SSRS indicator that I am trying to get to turn green if the the update date is today or yesterday. The Below Code is the expression used which works for today. my question is how could I get this to also show if it was updated yesterday.

=IIF(Fields!UpdateDte.Value<Today, "100","1")

The query that populates the date is a simple query populating a data time. This is in SQl Server Reporting services SSRS 2008 R2. I then used a numeric to have 100 be red and 1 be green.


Solution

  • Try this:

    =iif(DATEDIFF("d", Fields!UpdateDte.Value, Today)>1,"Red","Green")