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 :
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 :
If I want to use date as MONTH-1 ,WEEK-1 and DAY-10 so what is the format for such type of inputs.
ReplyDelete