Getting #Error in SSRS2008R2

  • I want to format dates in a column. Some of the columns are blank (null) and that is where I get #Error when I run the report

    IIF(IsDate(Fields!LICDDATE.Value),FormatDateTime(Fields!LICEDDATE.Value,DateFormat.ShortDate),Nothing)

    IsDate returns True if the is valid date and returns False is there is Null value.

    Thanks for any suggestions.

  • Hi

    I simulated your issue, I don't get any errors. However I had to change a field name

    LICEDDATE vs LICDDATE in the IIF

    My IIF

    =IIF(IsDate(Fields!LICEDDATE.Value),FormatDateTime(Fields!LICEDDATE.Value,DateFormat.ShortDate),Nothing)

    You evaluate the LICDATE and transform the LICEDDATE Field in your IIF statement. If the IIF statement is omitted and only the format is applied on the field the format presents '1/1/0001' for the null (ISNOTHING) value..

    Hopes this helps

    Regards Kees

Viewing 2 posts - 1 through 1 (of 1 total)

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