locked
Display Monthname in 3 Charcters RRS feed

  • Question

  • User472798847 posted

    Hi,

    How to display the MonthName in 3 characters in SSRS report..

    Example:

    I will enter Month as 11  i need to display as "NOV" not "November"

    Please help me ... Thanks in Advance

    Tuesday, December 11, 2012 4:38 AM

All replies

  • User-654786183 posted

    If you only want the short name for month you can use

    select convert(char(3), TableName.ColumnName, 0)

    and this will give the full name of the month

    select datename(month, S0.OrderDateTime)

    Tuesday, December 11, 2012 4:45 AM
  • User-1716253493 posted
    use custom format d MMM yyyy
    Tuesday, December 11, 2012 4:53 AM
  • User1977787504 posted

    =Cdate(Now).ToString("MMM,dd,yyyy") for 3 alphabets of month.
    =Cdate(Now).ToString("MMMM,dd,yyyy") for complete name of month

    What ever format you can choose,


    You can put date field in place of Now also

    kindly tell us I am not able to understand where do you want to enter month as 11?

    Wednesday, December 12, 2012 7:36 AM
  • User1534498098 posted

     SELECT CONVERT(VARCHAR(26), GETDATE(), 130).....Eg:  28 Apr 2012 12:39:32:429AM

     SELECT CONVERT(VARCHAR(10), GETDATE(), 7) ....Eg:  Jan 24, 12 

     

     

    Thursday, December 13, 2012 12:02 AM
  • User-830595639 posted

    Hi,

    Use the below expression.

    UCase(Left(MonthName(11),3))

    Instead of 11 you can use the value from parameter or from DB fields.

    Monday, December 17, 2012 5:03 AM
  • User-451195045 posted

    u can try this

     

     

    select Substring(DateName(mm,getdate()),1,3)

    Monday, December 17, 2012 5:06 AM