[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2541
  • Last Modified:

SSRS convert parameter dates to string

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
rwheeler23
Asked:
rwheeler23
  • 3
1 Solution
 
planoczCommented:
Try this...
"Dates From: " & Format(CDate(Parameters!BegDate.Values), "MM/dd/yyyy").ToString & " to " & Format(CDate(Parameters!EndDate.Values), "MM/dd/yyyy").ToString
0
 
rwheeler23Author Commented:
I tried this an other variations and none of them worked.
0
 
rwheeler23Author Commented:
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
 
rwheeler23Author Commented:
Thanks for the try. It got me going in the correct direction.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now