How to check if field is null using expression RRS feed

  • Question

  • I have a date field that may be null, if it is null, I want the field to be blank otherwise format the date.  I've been trying things similar to what I have below without success.  I would appreciate some help.

    = IIf( Fields!date_next.Value Is System.DBNull, "", FormatDateTime(Fields!date_next.Value) )

    Monday, September 8, 2008 4:18 PM


  • Hi Korazy,

    Couple of variations to try.

    = IIf(IsNothing( Fields!date_next.Value), "", FormatDateTime(Fields!date_next.Value) )

    = IIf(Fields!date_next.Value Is Nothing, "", FormatDateTime(Fields!date_next.Value) )
    Brad Syputa, Microsoft Reporting Services This posting is provided "AS IS" with no warranties.
    Wednesday, September 10, 2008 11:30 PM