Jump to content
Changes to the Jaspersoft community edition download ×

set date format

Recommended Posts

By: Tzanko - tsanstef

set date format

2002-09-25 08:11



another question.

I found out that I get a DateFormat error in the evaluate method of the object that Jasper creates.

Is there a way to set the DateFormat? And how.

My date format is dd/mm/yy (ex 25/09/02).

It used to work fine with my previous format but we changed the format in the DB istself.

Thank You



By: Teodor Danciu - teodord

RE: set date format

2002-09-26 07:22




If I understand correctly, you have declared your

report field as java.util.Date, even if in the database

it is stored as VARCHAR or something, using

a particular date format.

And the engine fails to create a java.util.Date

object for your field because it does not recognize

the format of the data in the database.


If this is the case, I suggest you declare the field

as java.util.String and to convert it into

java.util.Date you can use a report variable in which

you can specify the format.


I hope this helps.


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...