2004 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: finzic - finzic Problem with Date type 2005-09-06 13:25 Hi all, I am experiencing serious problems with the simple Date type. I create a Date textfield in a *.jrxml report. My custom data source adapts my DB field in order to pass a Date in the getFieldValure() method. Since it is not possible to create a Date object by passing it day, month and year in the constructor, I create a Calendar object, set day month and year in it and then convert it to a Date object. PROBLEM: the Date object is always 1 month later than the original date, so I cannot show it in the report as a date. Any suggestions? By: Dejan Nikolic - decky RE: Problem with Date type 2005-09-07 00:29 This is not realy JasperReports problem. If you check Calendar class, you will find JANUARY constant which have value 0. This means that if you need to set September as a month you will have to put 8; not 9. 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