Solved

SSRS convert parameter dates to string

Posted on 2014-10-21
4
880 Views
Last Modified: 2014-10-23
I have beginning and ending date parameters in my report. In the header section I want to put a string stating the dates this report covers. What is the correct syntax to convert these date parameters fields to string? What I have tried does not work.

='From Date: '+Format(ParameterParameters!BegDate.Values,"MM/DD/YY")+' To Date: '+Format(Parameters!EndDate.Value,"MM/DD/YYYY")
0
Comment
Question by:rwheeler23
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 40396094
Try this...
"Dates From: " & Format(CDate(Parameters!BegDate.Values), "MM/dd/yyyy").ToString & " to " & Format(CDate(Parameters!EndDate.Values), "MM/dd/yyyy").ToString
0
 

Author Comment

by:rwheeler23
ID: 40396099
I tried this an other variations and none of them worked.
0
 

Author Comment

by:rwheeler23
ID: 40396110
After trying a few hundred variations I found that this worked.

="Date From: " & Cstr(Format(Parameters!BegDate.Value,"MM/dd/yyyy")) & " To: " & Cstr(Format(Parameters!EndDate.Value,"MM/dd/yyyy"))
0
 

Author Closing Comment

by:rwheeler23
ID: 40399174
Thanks for the try. It got me going in the correct direction.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this short article I will be talking about two functions in the SQL Server Reporting Services (SSRS) function stack.  Those functions are IIF() and Switch().  And I'll be showing you how easy it is to add an Else part to the Switch function. T…
After much searching across the internet I have found that you could not set the name of the file you were attaching to dynamic report subscriptons in Microsoft Reporting Services. I did manage to find one article showing you how your could make a s…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question