Datetime parameter format changes after selection

  • Hi,

    I have an SSRS report which has From and To date parameters. I have declared them as datetime data type. When I preview this report on my local machine the selected date remains in dd/mm/yyyy format which is expected and the report renders correctly. However, when I deploy the report to sharepoint 2010, the date parameter format changes to mm/dd/yyyy after selection. Also, sometimes it adds the time part as well.

    So, if I were to select 24th January 2012, I want the date to be displayed as 24/01/2012, but it changes to 01/24/2012 and sometimes it changes to 01/24/2012 12:00:00 AM. This gives an error on the report.

    I have checked that the language setting on the report server, sharepoint server and my local machine are set to English (United Kingdom). Even the regional setting on the sharepoint site is set to English (United Kingdom).

    Any help is greatly appreciated.

    Thanks.

  • Hi ninu

    Have you tried explicitly formatting the date on the textbox of the report to the format that you want....?

    jag7777777

  • Actually I am converting to the format using this expression while passing it to the query - format(Parameters!ToDate.Value, "yyyyMMdd")

    So the data is returned OK for some cases.

    The main problem is when a date like 24 Jan 2012 is selected. In this case the month becomes 24 which throws an error.

    As far as I understand we can't format the value displayed in the parameter text box of the date picker control.

  • I managed to solve this issue by adding the UICulture="en-GB" in the <%@ Page language="C#" tag in RSReportViewer.aspx page in sharepoint server.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply