Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding the time in a "date/time" parameter for SSRS reports

In my SSRS report, I wanted to allow the users to specify a date (that would be used to filter the data on a report). When I did this, the parameter also includes the time. Is it possible to just allow the user to select a date, without showing the time? Can I also give it a default value of the current date?

The steps that I had already applied to the report parameter:

  1. Set the parameter to "date / time" data type.
  2. Set the default value of this parameter to be =Now.

When I did this, the report parameter would show me:

23/04/2013 00:31:22
like image 403
Matthew Dunsdon Avatar asked Apr 22 '13 23:04

Matthew Dunsdon


People also ask

How do you make a parameter optional in SSRS?

Set the parameter to 'Allow null value' under General section. Null according to SSRS means it does not have to be set, thus making it optional.

What is CDate in SSRS?

The CDate function converts the value to a date. The Now function returns a date value containing the current date and time according to your system. DateDiff returns a Long value specifying the number of time intervals between two Date values.

How do I display time in SSRS report?

The first approach to Format Data and Time in SSRS ReportOnce we click on the Text Box Properties.. option, a new Text Box Properties window will be opened. Please select the Number tab and then date category. Our report preview is displaying the Hire date in the same format.


1 Answers

Instead of using =Now() you can use =Today() which provides current date without time .If you are getting data from DB then you can

=Format(Fields!YourDateColumn.Value,"dd/MM/yyyy")

Check this MSDN article for using expressions and formatting the date time column

like image 161
praveen Avatar answered Oct 15 '22 15:10

praveen