如日期时间空字符串或NULL?如何检查? [英] DateTime as empty String or null ?How to check?
本文介绍了如日期时间空字符串或NULL?如何检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问:
我要检查的日期时间对空值
空在我的报告中的单元格,如果日期时间是null.but我不知道如何做到这一点:它出现这样的 1/1/0001
如果是null.and我希望它是空单元格。
这是我的数据集的数据类型:
这是我的专栏的前pression值:
=的FormatDateTime(领域!D_DateTime.Value,2)
解决方案
<$p$p><$c$c>=IIf(FormatDateTime(Fields!D_DateTime.Value,2)=CDate(\"1/1/0001\"),\"\",FormatDateTime(Fields!D_DateTime.Value,2))
非常感谢,我想这解决了我的问题。
Q:
I want to check the DateTime against null value
to empty the cell in my report if the datetime is null.but i don't know how to do this :it appears like this 1/1/0001
if it was null.and i want it to be empty cell.
This is the datatype in my dataset :
and this is the expression value of my column :
=FormatDateTime(Fields!D_DateTime.Value,2)
解决方案
=IIf(FormatDateTime(Fields!D_DateTime.Value,2)=CDate("1/1/0001"),"",FormatDateTime(Fields!D_DateTime.Value,2))
Thanks a lot ,i think this fixes my problem.
这篇关于如日期时间空字符串或NULL?如何检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文