Groups | Blog | Home
all groups > sql server reporting services > july 2006 >

sql server reporting services : Edit Date Expression for Report Parameter


randy1200
7/20/2006 11:26:01 AM
I have my Reporting Services Report open in Visual Studio2005. I have the
layout view selected, which makes the Report Menu available at the top of
Visual Studio 2005 (File, Edit...Report). Under the Report Menu, I've
selected Report Parameters.

I have the values StartDate and EndDate. For EndDate, I have
=Today
under Non-quired Default values, and that works great.

For StartDate, I have
=DateValue("01/01/2006")
This works okay for the moment, but I'd really like to do something like
=DateValue("01/01/" + Year)
This doesn't compile because DateValue only accepts one parameter. Any ideas
how to edit the expression so that the year is always the current year?

Thanks,
--
randy1200
7/20/2006 1:01:02 PM
That Works! Many thanks.
--
Randy


[quoted text, click to view]
Ben Watts
7/20/2006 2:38:09 PM

try this

=cdate("01/01/"+cstr(year(today)))
it basically just adds the current year to 01/01/ and changes it all to date
format

[quoted text, click to view]

AddThis Social Bookmark Button