2001 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: Tzanko - tsanstef set date format 2002-09-25 08:11hi, 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 Hi, 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. Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now