[英]Date Formating withen switch expression SSRS
I am trying to format the data field in this switch SSRS expression. 我正在尝试格式化此开关SSRS表达式中的数据字段。 the expression works fine before I put the date format 在放置日期格式之前,表达式可以正常工作
= Switch(ISNothing ( Fields!Contract_Completion_Date_Actual.Value ) AND ISNothing (Fields!Contract_Completion_Date_Projected.Value), "TBD" , ( Fields!Contract_Completion_Date_Actual.Value = "") and (Fields!Contract_Completion_Date_Projected.Value = "") , "TBD", ISNothing ( Fields!Contract_Completion_Date_Actual.Value) , Format (Fields!Contract_Completion_Date_Projected.Value, "dd-MMM-yy"), ISNothing (Fields!Contract_Completion_Date_Projected.Value),Format (Fields!Contract_Completion_Date_Actual.Value, "dd-MMM-yy")) =切换(ISNothing(Fields! ,ISNOthing(字段!Contract_Completion_Date_Actual.Value),格式(Fields!Contract_Completion_Date_Projected.Value,“ dd-MMM-yy”),ISNOthing(字段! “))
I am getting this when I try to run the report 我在尝试运行报告时得到了这个
Just format the textbox as dd-MMM-yy (right-click, "TextBox Properties", Number, Date...) and remove the Format statement from your Switch statement altogether. 只需将文本框的格式设置为dd-MMM-yy(单击鼠标右键,单击“ TextBox属性”,Number,Date ...),然后从Switch语句中删除Format语句。 You'd only need to do the formatting in the switch if you wanted to use different formats for different values. 如果您想对不同的值使用不同的格式,则只需要在开关中进行格式化即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.