locked
how to display month column as Varchar RRS feed

  • Question

  • Hai

    Ihave a doubt ,while doing report ,I have month column, I   have passed 11 in  month        parameter ,but I want to display month column as NOV not 11. 

    Have u any idea.

    Monday, June 1, 2015 7:30 AM

Answers

  • Hi Shanthi,

    Per my undersanding that you have an field "Month" which returns the value like "1,2,3,4...12", you have create parameter based on this field and now you want to display the Month Name with 3 characters in the report, right?

    If this is the case, you can add expression to convert the Month number into Month name or add an calculated field by using the same expression. The expression as below for your reference:
    =UCase(Left(MonthName(Fields!Month.Value),3))

    If you want to display the full month name, you can use the expression:
    =MonthName(Fields!Month.Value)

    If the month name convert based on an date field, as Manu Kapoor mentioned that you can use the expression:
    =MonthName(Month(Fields!datefield.Value))

    OR:
    =Format(Fields!Date.Value,"MMM")

    If you still have any problem, please feel free to ask.

    Regards,
    Vicky Liu


    Vicky Liu
    TechNet Community Support


    • Edited by Vicky_Liu Tuesday, June 2, 2015 3:28 AM
    • Proposed as answer by Vicky_Liu Saturday, June 6, 2015 6:24 AM
    • Marked as answer by Vicky_Liu Tuesday, June 9, 2015 6:14 AM
    Tuesday, June 2, 2015 3:22 AM

All replies

  • Hello - You can try this, set-up the expression for this field and use something like below:

    =MonthName(Month(Fields!datefield.Value))


    Good Luck!
    Please Mark This As Answer if it solved your issue.
    Please Vote This As Helpful if it helps to solve your issue

    Monday, June 1, 2015 7:33 AM
  • Hi Shanthi,

    Per my undersanding that you have an field "Month" which returns the value like "1,2,3,4...12", you have create parameter based on this field and now you want to display the Month Name with 3 characters in the report, right?

    If this is the case, you can add expression to convert the Month number into Month name or add an calculated field by using the same expression. The expression as below for your reference:
    =UCase(Left(MonthName(Fields!Month.Value),3))

    If you want to display the full month name, you can use the expression:
    =MonthName(Fields!Month.Value)

    If the month name convert based on an date field, as Manu Kapoor mentioned that you can use the expression:
    =MonthName(Month(Fields!datefield.Value))

    OR:
    =Format(Fields!Date.Value,"MMM")

    If you still have any problem, please feel free to ask.

    Regards,
    Vicky Liu


    Vicky Liu
    TechNet Community Support


    • Edited by Vicky_Liu Tuesday, June 2, 2015 3:28 AM
    • Proposed as answer by Vicky_Liu Saturday, June 6, 2015 6:24 AM
    • Marked as answer by Vicky_Liu Tuesday, June 9, 2015 6:14 AM
    Tuesday, June 2, 2015 3:22 AM