java - Date locale in JasperReports -


I am writing a program in Java that uses JasperReports to generate reports is. One field in the report area is a date field. I send local variables like this:

  map parameter parameter = new hashmap (); ParametersMap.put (JRParameter.REPORT_LOCALE, myLocale2);  

This is working fine but the problem is that the time is also visible in the date field. I used the DATE () function in MySQL, but I still had time in my report. I just need to show the date (in the right place). If I define the pattern variable in the report that the date is shown in a specific format then the time will not appear, but this will cancel the locale setting and I do not want it, can anyone tell me to get rid of time information How to get it?

You can try this:

  1. The ultimate Example:

parametersMap.put ("date", new simple data format ("mmm dd yyyy", locale.frenas). Format (new date ());

Set this date in your report.

Enjoy.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -