Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Created Date Name based off of Parameter

Status
Not open for further replies.

fcoley

MIS
Aug 3, 2011
2
US
I have a parameter, @MaxDate.. I need to create a field off of that date to return:

Prior month's enddata, for example. If I pass in 10/10/2011 as the @MaxDate, I want to return September 30 ,2010 or 9/30/2010?

How can I accomplish this?

Thanks a bunch!!
 

Untested, but could you use an expression like:

Code:
DATEADD(DAY, -(DAY(Parameters!MaxDate.Value)), Parameters!MaxDate.Value)

and format the output?


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top