Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSRS convert parameter dates to string

Posted on 2014-10-21
4
Medium Priority
?
1,994 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

877 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