Solved

SSRS convert parameter dates to string

Posted on 2014-10-21
4
739 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now