10

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
Matthew Dunsdon
  • 133
  • 1
  • 1
  • 8

3 Answers3

26

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

praveen
  • 12,083
  • 1
  • 41
  • 49
  • 3
    Note that the parameter type is "date/time" so if you only specify a date as the default, the parameter value will still include a time component of 00:00:00. This can be important if you then use the parameter value to compare to a SQL Server DATETIME data type. – Nathan Griffiths Apr 23 '13 at 02:22
1

enter image description hereDepends on type of IDE you use, you may NOT be able to use some of those suggested methods. This always work for me: Set parameter type=TEXT instead of Date/Time, then on query convert your date as follow: SELECT Value=Convert(varchar(20),payperiod,101)

HaiNguyen
  • 312
  • 2
  • 10
0

I hope this helps. My way of accomplishing this is:

=DateSerial(Year(Now), Month(Now), Day(Now))

SSRS Default Date Param

Thank You,

Nour Lababidi
  • 414
  • 4
  • 7