Question

I'm trying to add days to a date and then compare to see if it's outside a range to color code a cell. It's not working--I think I may be making a simple syntax error.

iif(
  (DateAdd("d", CInt(Fields!Days.Value), Fields!Date.Value) < Now), "Red", "White")
)
Was it helpful?

Solution

It looks like you have an extra ")" at the end.

=iif((DateAdd("d", CInt(Fields!Days.Value), Fields!Date.Value) < Now), "Red", "White")

OTHER TIPS

Are you starting your expression with an "=" sign?

=iif(
    DateAdd("d", CInt(Fields!Days.Value), Fields!Date.Value) < Now, 
    "Red", "White")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top