DateTime为空String或null?如何检查? [英] DateTime as empty String or null ?How to check?
本文介绍了DateTime为空String或null?如何检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Q:
我想根据空值
检查DateTime,以清空报表中的单元格datetime是null.but我不知道如何做到这一点:它看起来像这样 1/1/0001
如果它是null.and我希望它是空的
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.
这篇关于DateTime为空String或null?如何检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文