zazzu
zazzu

Reputation: 37

Date Formating withen switch expression SSRS

I am trying to format the data field in this switch SSRS expression. 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"))

I am getting this when I try to run the report

enter image description here

Upvotes: 0

Views: 286

Answers (1)

Russell Fox
Russell Fox

Reputation: 5435

Just format the textbox as dd-MMM-yy (right-click, "TextBox Properties", Number, Date...) and remove the Format statement from your Switch statement altogether. You'd only need to do the formatting in the switch if you wanted to use different formats for different values.

Upvotes: 0

Related Questions