Skip to main content



      Home
Home » Archived » BIRT » turning any date format into Date object for Date parameter?
turning any date format into Date object for Date parameter? [message #237759] Fri, 11 May 2007 12:02 Go to next message
Eclipse UserFriend
Originally posted by: dan.dan.com

Hi all,
First thank you all for you help. I've posted several questions on this
newsgroup and get great responses.

I'm using the report engine only, I'm not using the viewer at all.

It looks like that engine expects a date format to be in a java.util.Date
object. Here's the problem. The user of the application can create
reports, so date parameters can be in the any format. That means I have to
be able to handle all formats.

I need to be able to take any parameter input date format from a user, and
convert it to this Date object (and validate it along the way). Is there a
way to get the date parameter information in a pattern that I can pass to
java.text.SimpleDateFormat? Otherwise, do I have to build this pattern
matching myself (ie birt "Short Date" = SimpleDateFormat "dd/mm/YY").

Also I see a "custom format" in the birt designer. I could not get it to
work for me ... but I'm hoping the value of this will be a pattern I can
feed into SimpleDateFormat.

Thank you for the help, Dan
Re: turning any date format into Date object for Date parameter? [message #238617 is a reply to message #237759] Thu, 17 May 2007 10:38 Go to previous message
Eclipse UserFriend
Hello Dan,

Dan great to hear that you have been getting good support, until this post
that is.

Date Parameters in BIRT, what can I say? It is a tricky subject and I am
not particularly happy with how hard it is to get it right. If you could
add an enhancement Bugzilla request to make the Date Parameter type easier/less
brittle I think that would be a great idea.

In terms of your specific problem, I think that you are going to have to
write your own parser/validation routines.

Scott Rosenbuam



> Hi all,
> First thank you all for you help. I've posted several questions on
> this
> newsgroup and get great responses.
> I'm using the report engine only, I'm not using the viewer at all.
>
> It looks like that engine expects a date format to be in a
> java.util.Date object. Here's the problem. The user of the
> application can create reports, so date parameters can be in the any
> format. That means I have to be able to handle all formats.
>
> I need to be able to take any parameter input date format from a user,
> and convert it to this Date object (and validate it along the way).
> Is there a way to get the date parameter information in a pattern that
> I can pass to java.text.SimpleDateFormat? Otherwise, do I have to
> build this pattern matching myself (ie birt "Short Date" =
> SimpleDateFormat "dd/mm/YY").
>
> Also I see a "custom format" in the birt designer. I could not get it
> to work for me ... but I'm hoping the value of this will be a pattern
> I can feed into SimpleDateFormat.
>
> Thank you for the help, Dan
>
Previous Topic:2.2M6 Extremely Slow?
Next Topic:How to create multi bar chart
Goto Forum:
  


Current Time: Sat Jun 07 17:51:58 EDT 2025

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

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

Back to the top