Jaspersoft BI Tools

iReport,Jaspersoft Design Studio,Jaspersoft Server, Schema Workbench,Analysis,Dashboards, Self Service BI, Domains,Topics,Ad-Hoc Reports, Jaspersoft ETL, Embedding BI,HTML-5 charts, Fusion Charts,JFree Charts,Drill down reports , Drill down Dashboards,Visualize.js, Performance Tuning, D3 Charts, Jaspersoft Customization

Wednesday, March 05, 2014

Jasper Server Calendar Date input control date fomat change - Change date format from yy-mm-dd to mm/dd/yyyy

Hi Guys,

This post talk about how you can change the date format of built in Calendar  in Japer Server.

Example Scenario :
Changing the yy-mm-dd format to mm/dd/yyyy
For instance
Changing 2014-03-06 to 03/06/2014

Steps :
1) You need to change the properties of jasperserver_config.properties filein 2 places
2)
Location of the file

/opt/jasperreports-server-5.5/apache-tomcat/webapps/jasperserver-pro/WEB-
INF/bundles
File Name:
jasperserver_config.properties

3) Modify below code in the file
1st place code
 Original format : comment it
# Used for parsing and formatting dates by server
#date.format=yyyy-MM-dd
#datetime.format=yyyy-MM-dd HH:mm:ss
#time.format=HH:mm:ss
 Modified format:
 date.format=MM/dd/yyyy
datetime.format=MM/dd/yyyy HH:mm:ss
time.format=HH:mm:ss

2nd place code
Original format :
Comment it
#calendar.date.format=yy-mm-dd
#calendar.datetime.format=yy-mm-dd HH:mm:ss
#calendar.time.format=HH:mm:ss


Modified format:
calendar.date.format=mm/dd/yy
calendar.datetime.format=mm/dd/yy HH:mm:SS
calendar.time.format=HH:mm:ss

Once you done with the modification you must have to restart the jasper server.
Sample output :