我有一个报告,其中需要从datetime列中删除时间。我已经找到了这个表达式,但它将所有的空值更改为'1/1/0001‘
=FormatDateTime(Fields!Temperature_Control_Inspection_Date.Value,DateFormat.ShortDate)我尝试了下面的表达式寻找空,但它似乎不起作用。
=IIF(Fields!Temperature_Control_Inspection_Date is nothing, nothing, FormatDateTime(Fields!Temperature_Control_Inspection_Date.Value,DateFormat.ShortDate))如何才能只显示DateTime列中的日期而不将所有空值替换为'1/1/0001'?
发布于 2018-12-19 20:09:27
以下将起作用:
=IIf(IsNothing(Fields!Temperature_Control_Inspection_Date.Value), "", FormatDateTime(Fields!Temperature_Control_Inspection_Date.Value, DateFormat.ShortDate))上面的空日期将为空。此外,它将删除时间,只需给您的日期部分。
https://dba.stackexchange.com/questions/225397
复制相似问题