locked
DateTime Parameter Adds 'AM 12:00:00' RRS feed

  • Question

  • Hi,

    I am using ssrs 2008.

    I have a DateTime (calendar) parameter in my report.

    When I browse my report directly from the Report Server there are no problems.

    I have also an ASP.NET application which is located on a Web Server, this application display the report using the ReportViewer control (Version 9.0.0.0).

    The problem occurs when I browse the report through the Web Server application – when I select a date from the DateTime parameter it always adds me the hour '12:00:00 AM', for example if I select 21/05/2010, it shows me     'AM 12:00:00 21/05/2010'.

    I tried to set the report language (in the .rdl file to – '=User!Language') but it does not solve the problem.

    I know it is possible to change the date format in the 'regional and language options' but I don’t know what I should change.

    How can I remove the hour from my DateTime parameter – for the user will not see it?  

    Any help will be appreciated.

    Sunday, August 8, 2010 7:34 AM

Answers

  • use formatedatetime while displaying datetime value 
    • Marked as answer by Jerry Nee Monday, August 23, 2010 12:37 AM
    Monday, August 9, 2010 7:20 AM

All replies

  • It looks like report viewer bug. I guess this datetime parameter is from a query. So try to create another label column for actual time and then you can totally control how to display datetime.
    Have fun with Reporting Service
    Sunday, August 8, 2010 11:29 AM
  •  

    This Date Time is not from query, the user selects it from the DateTime parameter (calendar control).

    I deployed the application I mentioned above to other web server, and it does not happen from there.

    But it still happens on the original web server.

    Should I check anything special on the web server – what can cause this behavior?

     

    Monday, August 9, 2010 5:14 AM
  • Hello,

    If you are displaying in the report then use this expression.
    =FORMAT(Paremeters!DateParameter.Value,"MM/dd/yyyy")

    Hope its clear....


    Pavan Kokkula Infosys Technologies Limited.
    • Proposed as answer by razyee Monday, August 9, 2010 5:48 AM
    Monday, August 9, 2010 5:23 AM
  • I don’t display the date in my report, as I said the user selects it from the DateTime parameter (calendar control) – and it automatically adds me hour "AM 12:00:00".

    I just don’t want the hour to be displayed in the parameter itself.

    Why does it add hour "AM 12:00:00" automatically?

    Monday, August 9, 2010 6:49 AM
  • use formatedatetime while displaying datetime value 
    • Marked as answer by Jerry Nee Monday, August 23, 2010 12:37 AM
    Monday, August 9, 2010 7:20 AM
  •  

    Hi Razyee,

    How can I use formatedatetime while displaying datetime value, to format the datetime displayed in the parameter itself?

    Monday, August 9, 2010 7:45 AM
  •  

    I do not think it is possible to format a DateTime parameter value in the parameter itself.....

    Is it possible? how?

    Monday, August 23, 2010 4:28 AM