I'm using date parameter on my report. Currently the date displayed with this format "MM/dd/yyyy".
Is there any chance to change its format to "dd-MMM-yyyy" or something start with "dd" ?
I'm searching on the report properties but there's nothing to format its value.
I have attached my screen for additional information and any help will be great.
9 Answers, 1 is accepted
You can use custom template for the DateTime parameters, where you can specify the format for the dates - How To: Create a custom parameter editor.
I hope this helps you.
Thanks for your reply. I'll read it as my reference.
But my project using Integrated Visual Studio Report Designer UI, which I didn't explain it earlier and sorry for that.
Does that custom report parameter still can be use or there is another way to create it?
The custom parameter editor is actually a UI template that will be used for a specific type of report parameters in the HTML5 Report Viewer's parameters area. It is not related to the report definition.
Using this custom template, you can replace the default editors for report parameters, and use your own. Consider the following example:
You can check the ReportViewer-x.x.x.x.js file how the default editors are created.
If Kendo Globalization suits your requirements, you can use this approach instead of creating a template only for Datetime parameters.
If you need to change the culture specific formats in the report, please take a look at the Report Globalization help article.
In order to provide you more accurate suggestions, please elaborate whether you need to globalize the whole application, or you need a specific presentation for Datetime parameters only in the viewer.
I'm sore 50% or more of your customers is outside of USA, and the rest of the world does not write MM/dd/yyyy.
They use either dd/MM/yyyy or yyyy-MM-dd.
One would expect that the data input control that is generated at least read the culture that the report was specified in !
Thank you for your feedback! The settings of the report such as Culture will not affect the report viewer. As report viewer uses Kendo UI DateTimePicker widget to display date parameters its settings need to be changed separately. The two approaches for changing the date format used by this widget described earlier by Stef are still valid.
Another 2 years and another attempt at asking if this has been changed.
After building a pile of reports I realized the date picker is displaying the date in the wrong format.. I am really hoping there is a simple way to change it to display 'dd/mm/yyyyy' now without having to add heaps of code to every report! :(
The format is only wrong from the web interface . I am using the HTML viewer. I am trying to work out how to change the culture for that .. but so far no luck!
For anyone else struggling.. I simply had to follow steps 1 ,2 and 3 here