Groups | Blog | Home
all groups > sql server reporting services > january 2005 >

sql server reporting services : Using Parameters in C# functions


Ben Sullins
1/5/2005 12:55:03 PM
Hello,

I was wondering if anyone has tried to use a paramter in a c# function. I am
trying to use a date parameter to return the previous month...

Here's what I tried that didn't work...

=datetime.parameters!startdate.addmonths(-1).tostring("MMMM")

Thanks,
--
Ben Sullins
Our Vacation Store
Lev Semenets [MSFT]
1/5/2005 10:09:10 PM
try this:
=CDate(Parameters!StartDate.Value).AddMonths(-1).ToString("MMMM")

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Ben Sullins
1/6/2005 10:19:06 AM
Works perfect, thank you!

[quoted text, click to view]
AddThis Social Bookmark Button