|
Re: Two Digit Date Format Support [message #368533 is a reply to message #368518] |
Mon, 08 June 2009 14:57 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.windstream.net
Anirudh
You should be able to do this with BIRT script. After the user enters
the value where are you using it?
If you were using it in an expression you should be able to do something
like
var myyear = params["EnteredYear"].value
if( myyear > 40 )
//assumes int parm val
myyear = myyear +1900;
}else{
myyear = myyear+2000;
}
You can then use myyear to create a date variable.
Jason
Anirudh wrote:
> Hi,
>
> Is there a two digit date format support in BIRT, like we have in windows.
> e.g. if the user enters a two digit no. it should be interpreted between
> two years. Say we set the threshold value to be 40 somewhere.
> Now if the user enters a value <= 40, the birt should pick the system
> year and prefix this no with it. if the user enters a value >40 then it
> should use 19 as a prefix. e.g (1945)
>
> If this is not supported, is there any way we can extend BIRT to provide
> this functionality.
> Any help would be highly appreciated.
>
> Thanks,
> Anirudh
>
|
|
|
|
Re: Two Digit Date Format Support [message #368550 is a reply to message #368545] |
Tue, 09 June 2009 13:20 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.windstream.net
Anirudh,
I cant think of an easy way to include this without modifying the
source. There is a script extension that allows you to include your own
functions, but I believe the parameter would still have to be a string
to begin with. If you want log an enhancement request to ask for the
feature.
Jason
Anirudh wrote:
> Jason,
> Thanks for the reply. I would further like to ask you if there is any
> way by which we can extend BIRT to have this set as a setting. (say
> somewhere in Prefrences). Now when we have parameterised reports, with
> the type of parameter being date.
> Can we somehow apply this logic to convert the two digit year, when the
> user enters the date in 'yy' or mm-dd-yy format.
>
> Having this option to set at the Prefrence would ensure that all dates
> with year as 'yy' are automatically converted.
>
>
> Anirudh.
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03341 seconds