Solved

SSRS convert parameter dates to string

Posted on 2014-10-21
4
1,290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
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 …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

632 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