Thursday, 6 March 2014

Date input control default value in jasper iReport - Giving date value in default expression.


This simple post tell you about the issue in giving default value for date input control(s)

Default value = Direct date value 

When you give date input control default value directly for example 06/03/2004 you may get the default value in the server input control for it as 0.5677777 or some thing similar to it or some other date..

You need to give the date value using SimpleDateFormat class along with parse function applied for that date.

For example:
new SimpleDateFormat("MM/dd/yyyy").parse("01/06/2014")

The above will come as it is in the server date input control now.

:D

No comments:

Post a Comment