I'm coming across strange behavior while evaluating expression in ssrs.
=IIF(Fields!LeadcreatedOn_createdonValue.Value is nothing OR Fields!createdonValue.Value is nothing,0,DateDiff("d",Format(Fields!LeadcreatedOn_createdonValue.Value,"MM/dd/yyyy"),Format(Fields!createdonValue.Value,"MM/dd/yyyy")))
When both fields has date value datediff works fine and difference is displayed but if one of the fields is empty instead of showing 0 it results in #error.
When I tried display "yes" or "no" depending on condition result , it worked fine. What is the problem in above expression?
Thanks