SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Concatenate values in SSRS 2008
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Praz
Starting Member

9 Posts

Posted - 11/16/2012 :  18:56:30  Show Profile  Reply with Quote
Hi,

Can you help me out with the correct expression for concatenating the Month name, year and text value?

Right now i am using,

= Format(MonthName((Month(Today()))-1) + Year(Today()) + "$")

and i want a format "October 2012 Payments". Any help or suggestions are appreciated.

Thanks
Praz

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/16/2012 :  23:14:22  Show Profile  Reply with Quote
=MONTHNAME(MONTH(Dateadd(MONTH,-1,Today()))) + " " + CStr(YEAR(Dateadd(MONTH,-1,Today()))) + " Payments"

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Praz
Starting Member

9 Posts

Posted - 11/19/2012 :  12:12:13  Show Profile  Reply with Quote
Hi Visakh,

Appreciate your help but its still not working!! :(

There is some conversion problem with the Date value.

Thanks
Praz
Go to Top of Page

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/19/2012 :  12:44:51  Show Profile  Reply with Quote
See if this will work for you:
=MONTHNAME(MONTH(Dateadd("m",-1,Today()))) + " " + CStr(YEAR(Dateadd("m",-1,Today()))) + " Payments"
Go to Top of Page

Praz
Starting Member

9 Posts

Posted - 11/19/2012 :  17:58:23  Show Profile  Reply with Quote
Hi Sunita,

It works!! :)

Thanks
Praz
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/20/2012 :  02:57:50  Show Profile  Reply with Quote
Sorry it was a typo. it should have been

=MONTHNAME(MONTH(Dateadd(DateInterval.Month,-1,Today()))) + " " + CStr(YEAR(Dateadd(DateInterval.Month,-1,Today()))) + " Payments"

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000