Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 17, 2012 09:06 AM by shivalthakur
Member
5 Points
33 Posts
Dec 11, 2012 08:38 AM|LINK
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
Contributor
3832 Points
651 Posts
Dec 11, 2012 08:45 AM|LINK
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)
All-Star
30979 Points
6338 Posts
Dec 11, 2012 08:53 AM|LINK
118 Points
188 Posts
Dec 12, 2012 11:36 AM|LINK
=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?
Participant
1890 Points
435 Posts
Dec 13, 2012 04:02 AM|LINK
SELECT CONVERT(VARCHAR(26), GETDATE(), 130).....Eg: 28 Apr 2012 12:39:32:429AM
SELECT CONVERT(VARCHAR(10), GETDATE(), 7) ....Eg: Jan 24, 12
1254 Points
277 Posts
Dec 17, 2012 09:03 AM|LINK
Use the below expression.
UCase(Left(MonthName(11),3))
Instead of 11 you can use the value from parameter or from DB fields.
1837 Points
531 Posts
Dec 17, 2012 09:06 AM|LINK
u can try this
select Substring(DateName(mm,getdate()),1,3)
sailakshmi.e
Member
5 Points
33 Posts
Display Monthname in 3 Charcters
Dec 11, 2012 08:38 AM|LINK
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
senthilwaits
Contributor
3832 Points
651 Posts
Re: Display Monthname in 3 Charcters
Dec 11, 2012 08:45 AM|LINK
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)
Senthil Kumar Sundaram
oned_gk
All-Star
30979 Points
6338 Posts
Re: Display Monthname in 3 Charcters
Dec 11, 2012 08:53 AM|LINK
waqar1
Member
118 Points
188 Posts
Re: Display Monthname in 3 Charcters
Dec 12, 2012 11:36 AM|LINK
=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?
raghavendra ...
Participant
1890 Points
435 Posts
Re: Display Monthname in 3 Charcters
Dec 13, 2012 04:02 AM|LINK
SELECT CONVERT(VARCHAR(26), GETDATE(), 130).....Eg: 28 Apr 2012 12:39:32:429AM
SELECT CONVERT(VARCHAR(10), GETDATE(), 7) ....Eg: Jan 24, 12
Nishantg
Participant
1254 Points
277 Posts
Re: Display Monthname in 3 Charcters
Dec 17, 2012 09:03 AM|LINK
Hi,
Use the below expression.
UCase(Left(MonthName(11),3))
Instead of 11 you can use the value from parameter or from DB fields.
Thanks
Nishant
shivalthakur
Participant
1837 Points
531 Posts
Re: Display Monthname in 3 Charcters
Dec 17, 2012 09:06 AM|LINK
u can try this
Response.Write("Success");
Best Of Luck
Shival Thakur