SWITCH

  • Hello

    I am reporting a date value in a table - Month(fields!date.Value) - and the values are coming through numerically - 1 for January, 12 for December, etc.

    Is it possible to use SWICH to convert these to "January" when 1, "February" when 2, etc ? If so, how can I nest this within the expression above - Month(Fieds!Date.value)?

    Thanks

  • If the date field is available, you could do something like this:

    FORMAT(Fields!enrollDate.Value,"MMMM")

    and it will format the date as a Monthname....

    1="January" etc.

  • You can use Switch, Switch(Month(Fieds!Date.value)=1, “January”, Month(Fieds!Date.value)=2, “February”,…), easier to use Choose, Choose(Month(Fieds!Date.value), “January”, “February”…), a lot easier to use MonthName(Month(Fieds!Date.value)).

  • Thank you for the prompt and practical solution.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply