IIF expression with datediff

  • Hi guys,

    cn anybody tell me why this is not working..pls pls help me ..its urgent...

    iif(Fields!attend_edate.Value <> nothing and Fields!completedur.Value is nothing,datediff("dd",Fields!attend_sdate.Value,Fields!attend_edate.Value),Fields!completedur.Value)

  • vasanti mestri (2/18/2011)


    Hi guys,

    cn anybody tell me why this is not working..pls pls help me ..its urgent...

    iif(Fields!attend_edate.Value <> nothing and Fields!completedur.Value is nothing,datediff("dd",Fields!attend_sdate.Value,Fields!attend_edate.Value),Fields!completedur.Value)

    I have never been able to use an "And" in an IIF expression, instead you should nest it further into your expression.

    iif(Fields!attend_edate.Value <> nothing,IIF(Fields!completedur.Value is nothing),datediff("dd",Fields!attend_sdate.Value,Fields!attend_edate.Value),Fields!completedur.Value),Fields!completedur.Value)

  • Try

    iif(IsNothing(Fields!attend_edate.Value)=1 AND ...)

    Using AND does work correctly

  • Thnks u guys for ur quick resopnces....

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply