Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » BirtDateTime calculation wrong?
BirtDateTime calculation wrong? [message #629127] Mon, 27 September 2010 10:08 Go to next message
Eclipse UserFriend
Originally posted by: abel.macadam.eden.invalid


The report I build needs column heading containing the months, starting
with the previous month, the next column two months ago, etc. The
required result would be (as September is the current month)
aug jul jun etc.
(when the output is formatted as Date Time Custom MMM)

I can get this using the following formula:
BirtDateTime.addMonth(, -1) for the previous month
BirtDateTime.addMonth(, -2) for two months ago

However, when I get to:
BirtDateTime.addMonth(, -10)
I get unexpected results. Instead of
I get
27 nov 2009 12:06

Instead of dec I get 27 okt 2009 12:06

What am I doing wrong?

Re: BirtDateTime calculation wrong? [message #629185 is a reply to message #629127] Mon, 27 September 2010 12:54 Go to previous message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 210
Registered: July 2009
Location: Houston TX
Senior Member

The function is working correctly. 10 calendar months prior to September 27 is November 27 of the prior year. You just need to either truncate the date or extract the month part of the name for your header.
Previous Topic:Tribix rtf export problem
Next Topic:beforeOpen not always called for sub-report?
Goto Forum:

Current Time: Mon Apr 23 06:06:00 GMT 2018

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

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