Detecting NULL dates and showing empty string in SSRS

后端 未结 2 1878
[愿得一人]
[愿得一人] 2021-02-12 15:38

I\'m trying to format some cells in a Reporting Services report that will contain DateTime? values - or not.

If the underlying data has a NULL

相关标签:
2条回答
  • 2021-02-12 15:51

    use a code like this:

    If(isNull([date field]),Null, elsequote)
    
    0 讨论(0)
  • 2021-02-12 15:59

    I just tested the following expression and it replaced the null date with an empty string:

    =IIF(Fields!DatumBSE.Value is nothing, nothing, FormatDateTime(Fields!DatumBSE.Value, 2))
    

    The other suggestion that I would make is that you could format the date to the correct format in the report dataset by placing a CASE expression around the date value.

    0 讨论(0)
提交回复
热议问题