Skip to main content



      Home
Home » Archived » BIRT » YYYY vs yyyy in onrender()(YYYY vs yyyy in onrender())
YYYY vs yyyy in onrender() [message #996895] Thu, 03 January 2013 01:18 Go to next message
Eclipse UserFriend
hi,

We have a report with excel format, which has date format set in onRender():

this.setDisplayValue(Formatter.format(this.getValue(),"M/d/YYYY"));

With this format set we have got date displayed as 12/31/2013 instead of 12/31/2012.

This is happening only for the week the new year falls in. I mean only for 12/30 and 12/31 2012.

We get the correct dates if we change our date format to M/d/yyyy.We get 12/31/2012 and 12/30/2012.


So is there any difference between m/dd/yyyy and m/dd/YYYY from BIRT perspective in Formatter.format().

Any info regrding this would be of great help.


Thanks,
KHP

[Updated on: Thu, 03 January 2013 01:53] by Moderator

Re: YYYY vs yyyy in onrender() [message #997002 is a reply to message #996895] Thu, 03 January 2013 06:47 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

We have an issue with Birt Report 3.7 version , we are using Formatter.format() to format the date value as "M/d/YYYY" which is giving incorrect output. Expected date to be displayed is '12/31/2012' but because of this format it is displayed as '12/31/2013'.The year is rolled out to next year.We are unable to trace the root cause.
Is there any limitation with Formatter API of BIRT?
Please share any info in this regard

Thanks,
PP
Re: YYYY vs yyyy in onrender() [message #997125 is a reply to message #997002] Thu, 03 January 2013 15:28 Go to previous messageGo to next message
Eclipse UserFriend
I've not heard of or encountered this issue, myself. Can you attach a sample showing this issue, so I can see it? Thanks.

[Updated on: Thu, 03 January 2013 15:28] by Moderator

Re: YYYY vs yyyy in onrender() [message #1016094 is a reply to message #997125] Mon, 04 March 2013 18:20 Go to previous message
Eclipse UserFriend
I also came across this error using 3.7, in my case it was for the date 1/1/1988, it would show 1/1/1987 but only with the format MM/dd/YYYY. After I updated the format to MM/dd/yyyy the date showed correctly. It also showed correctly when I removed the format. What is the difference between the two? 2012 and 1988 are leap years, sounds like bug, going to check bugzilla after this post.
Previous Topic:Style - change class dinamically
Next Topic:Integrating birt perspective into new rcp-application
Goto Forum:
  


Current Time: Thu Mar 27 13:48:45 EDT 2025

Powered by FUDForum. Page generated in 0.04507 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top