Issue with date format in input control - jasperserver

I have a report that takes date range as input control. But when I enter the date in the input control, its format changes automatically and error message is displayed (screenshot attached).
What's going wrong here?

Its because of the date format you have given in the iReport which is mm/dd/yyyy and default date format of JasperReport server is yyyy-MM-dd.
You can change the date format of JasperReport server which is controlled by the Locale and therefore the locale bundles.
To change the date format edit jasperserver_config.properties which is under
\jasperreports-server-cp-5.5.0\apache-tomcat\webapps\jasperserver\WEB-INF\bundles
These are the date formats in jasperserver_config.properties file:-
date.format=dd-MM-yyyy
datetime.format=yyyy-MM-dd HH:mm
calendar.date.format=%d-%m-%Y
calendar.datetime.format=%Y-%m-%d %H:%M

Related

How to set default parameter as 7 days ago to different date format on ssrs

I have default parameter and this parameter shows me 7 days ago with the expression below:
=DateAdd("d",-7,CDate(Format(Today(), "MM/dd/yyyy")))
But my report just running without error while the customer using "MM/dd/yyyy" time format.
Is there a way to use this parameter ALSO with "dd/MM/yyyy" format?
I would like to set a parameter to show 7 days ago but ı would like to use this parameter with both time format.
Thanks
Don't use the Format. Just put =DateAdd("d",-7,Today()). It will automatically take the Format according to System's format.
Firstly, the format part of your expression is redundant and misleading - don't use it
=DateAdd("d",-7,Today())
Secondly, you don't have any choice of how SSRS displays it's datepickers. It shows american format only (M/d/Y)
A date is a value and values do not have a format. A date is displayed and has to be entered in a format that depends on the language settings of your browser. Using a date picker, you even don't have to care about the input format. So, just use an expression that calculates the desired value:
=Today.AddDays(-7)

How to change the date pattern in jasper server 7.1

Currently we are evaluating Jasper Server 7.1.
We have a reporting solution on SpagoBI with having around 500 different types of jrxml format and we want to move all of those to jasper server with less modification.
The date formats which we used in Spago is MM-DD-YYYY. But it looks Jasper Server is accepting only YYYY-MM-DD date formats.
Is there any way we can make it to MM-DD-YYYY instead of YYYY-MM-DD.
We tried modifying the configuration file Jaspersoft\jasperreports-server-cp-7.1.0\apache-tomcat\webapps\jasperserver\WEB-INF\bundlesjasperserver_config.properties with below but no luck.
Used for parsing and formatting dates by server:
date.format=MM/dd/yyyy
datetime.format=MM/dd/yyyy HH:mm:ss
time.format=HH:mm:ss
calendar.date.format=mm/dd/yy
calendar.datetime.format=mm/dd/yy HH:mm:ss
calendar.time.format=HH:mm:ss
repository.date.format=M/d/yyyy
repository.current.year.date.format=MMMMM d
repository.datetime.format=M/d/yyyy hh:mmaaa
repository.time.format=hh:mmaaa

Date format Wikimedia

I have a wiki in persian. In my preferences (user preferences), I can change date format for persian. And, I can see that the date format is as follow:
This picture shows that the user date format is correct and in persian, which is correct.
But when I have signed out, The date format of site is not persian. It looks like this:
This picture shows that the default date format is not persian, which is not the case I want to be.
I want the default date format of the site be in persian, too.
It would be great if some one guide me how to change the default time zone and date format of the wiki site.
Wiki Site Address: wiki.aicd.ir
I have found the answer as follow:
Add the following code at the end of LocalSettings.php file to change the default date format to 'persian':
$wgDefaultUserOptions['date'] = 'persian';
Wiki Site to Check

Localizing date on SSRS

I'm using the d Format on the date field
So when the report's Language is on German(de), July 22, 2012 appears as:
22.07.2012
When I switch the report's Language to English(en), July 22, 2012 appears as:
7/22/2012
How can I make the English date appear as 07/22/2012? i.e. the dates should appear as two digits regardless of the month being two digits or single digit
You can use custom date format such as MM/dd/yyyy. If you need custom format only for English report then you can use expression =IIf (User!Language = "en", "dd\mm\yyyy", "d")
You can use the following expression in you report to show the date in dd/mm/yyyy format. Following screenshot shows date time with and without modification to the expression.
Expression:
=string.Format("{0:MM/dd/yy}",Fields!ModifiedDate.Value)
Without modification
With Modification:
Hope this helps!

MakeInstant from Text doesn't work - Argument to MakeInstant should have a different form

I've been playing with MIT AppInventor and attempted to calculate a duration between two dates.
I take date values from two text fields. Clock.MakeInstant says it's only able to accept dates in MM/DD/YYYY format so I was careful to do that. Still, when I attempt to feed them into MakeInstant it always pops the same message about being able to only accept MM/DD/YYYY hh:mm:ss or MM/DD/YYYY or hh:mm. I printed entered text values before passing them to MakeInstant to confirm that they are not somehow corrupted and they are fine -- each just a date in MM/DD/YYYY format.
I have no idea what else to try. As far as I can tell I followed the instructions to the letter. Any examples on how to pass a date as text to Clock.MakeInstant?
see this screenshot source: https://groups.google.com/d/topic/app-inventor-shared-utilities-repository/3bA4wczU9pU/discussion
Taifun