Skip to main content



      Home
Home » Archived » BIRT » Display date report parameter in specific format
Display date report parameter in specific format [message #201009] Wed, 15 November 2006 13:42 Go to next message
Eclipse UserFriend
Originally posted by: Carole_l_hargrave.yahoo.ca

I have a report with 2 date report parameters that I want to display at
runtime in the format yyyy/mm/dd.

If I set my StartDate parm = 15-OCT-2006

IF I just add params["StartDate"], the date is displayed in long date
format.

params["StartDate"].value.getYear() returns 106
params["StartDate"].value.getMonth() returns 9
params["StartDate"].value.getDate() returns 15

Any ideas on what I need to do.

Thanks
Carole
Re: Display date report parameter in specific format [message #201638 is a reply to message #201009] Fri, 17 November 2006 12:37 Go to previous messageGo to next message
Eclipse UserFriend
There is a Format DateTime property in the property editor that
should allow you to format the way you want to.

Jason

"Carole Hargrave" <Carole_l_hargrave@yahoo.ca> wrote in message
news:8ffa92f9c007c6fb8502b171b9ddeb81$1@www.eclipse.org...
>I have a report with 2 date report parameters that I want to display at
>runtime in the format yyyy/mm/dd.
>
> If I set my StartDate parm = 15-OCT-2006
>
> IF I just add params["StartDate"], the date is displayed in long date
> format.
>
> params["StartDate"].value.getYear() returns 106
> params["StartDate"].value.getMonth() returns 9
> params["StartDate"].value.getDate() returns 15
>
> Any ideas on what I need to do.
> Thanks
> Carole
>
Re: Display date report parameter in specific format [message #202166 is a reply to message #201638] Tue, 21 November 2006 13:33 Go to previous message
Eclipse UserFriend
Originally posted by: seth.lipschitz.jpmorgan.com

Even if I specify the DateFormat in the property Window for the parameter
window, when I try to make an expression e.g. "startDate=" +
params["startDate"], it defaults to long format as well. The only way I
could get this to work is to do the following:
"startDate=" +
(params["startDate"].value.getMonth() + 1) + "/" +
params["startDate"].value.getDate() + "/" +
(params["startDate"].value.getYear() + 1900)
Previous Topic:Birt Chart Samples
Next Topic:Birt Report and PDF
Goto Forum:
  


Current Time: Sat Jul 12 12:15:46 EDT 2025

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

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

Back to the top