Re: [OT] : FormatKey how to set a format

2003-11-21 Thread Kirk Wylie
Are you absolutely sure you want to use doubles to store currency 
values? RDBMS systems have fixed-precision data types for exactly that 
reason.

While doubles are convenient, they can result in unintended consequences 
such as issues with .1 appearing places that it probably shouldn't.

Kirk Wylie
M7 Corporation
Rouven Gehm wrote:
Hi,

it works not quite well, but if i actually have a 17,5
it still only shows 17,5 not 17,50.
I can of course add 0.1 to 17,5 but thats hmm a hell of a hack.

As i want to use it to show currencys, i wonder if i can use
the NumberFormat.Field CURRENCY ???
Thanx

- Original Message -
From: "Markus" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 21, 2003 1:51 PM
Subject: Re: [OT] : FormatKey how to set a format
 > > Hi,
 > >
 > > its a little bit of topic, i have the problem, i want to show
 > > doubles on my jsps.
 > > I now use following format : #,##
 > Hi,
 > try #,00! This should work.
 > For a deeper look go to JavaAPI NumberFormat classes
 > Regards,
 > Markus
 > > which works quite good, but it cuts of the 0 at the end.
 > > E.g. i have 17,56546546 it show 17,57
 > > i have 17,50001 it shows 17,5
 > > but i want 17,50.
 > >
 > > Is there another format i can use ?
 > > Or do i have to create Strings and add the missing 0s ?
 > >
 > > Thanx
 > >
 > > Rouven
 > >
 > >
 > > -
 > > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > > For additional commands, e-mail: [EMAIL PROTECTED]
 > >
 >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] : FormatKey how to set a format

2003-11-21 Thread Rouven Gehm
Hi,

it works not quite well, but if i actually have a 17,5
it still only shows 17,5 not 17,50.

I can of course add 0.1 to 17,5 but thats hmm a hell of a hack.

As i want to use it to show currencys, i wonder if i can use
the NumberFormat.Field CURRENCY ???


Thanx

- Original Message - 
From: "Markus" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 21, 2003 1:51 PM
Subject: Re: [OT] : FormatKey how to set a format


> > Hi,
> > 
> > its a little bit of topic, i have the problem, i want to show
> > doubles on my jsps.
> > I now use following format : #,##
> Hi,
> try #,00! This should work.
> For a deeper look go to JavaAPI NumberFormat classes
> Regards,
> Markus
> > which works quite good, but it cuts of the 0 at the end.
> > E.g. i have 17,56546546 it show 17,57
> > i have 17,50001 it shows 17,5
> > but i want 17,50.
> > 
> > Is there another format i can use ? 
> > Or do i have to create Strings and add the missing 0s ?
> > 
> > Thanx
> > 
> > Rouven
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] : FormatKey how to set a format

2003-11-21 Thread Markus
> Hi,
> 
> its a little bit of topic, i have the problem, i want to show
> doubles on my jsps.
> I now use following format : #,##
Hi,
try #,00! This should work.
For a deeper look go to JavaAPI NumberFormat classes
Regards,
Markus
> which works quite good, but it cuts of the 0 at the end.
> E.g. i have 17,56546546 it show 17,57
> i have 17,50001 it shows 17,5
> but i want 17,50.
> 
> Is there another format i can use ? 
> Or do i have to create Strings and add the missing 0s ?
> 
> Thanx
> 
> Rouven
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] : FormatKey how to set a format

2003-11-21 Thread Rouven Gehm
Hi,

its a little bit of topic, i have the problem, i want to show
doubles on my jsps.
I now use following format : #,##
which works quite good, but it cuts of the 0 at the end.
E.g. i have 17,56546546 it show 17,57
i have 17,50001 it shows 17,5
but i want 17,50.

Is there another format i can use ? 
Or do i have to create Strings and add the missing 0s ?

Thanx

Rouven


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]