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:
- 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
Post a Comment