Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Format question
Sat, Dec 10 2011 7:00 PMPermanent Link

Tor J. M. Breines

Hi.
I am trying to format a number from a calculation with 2 decimals and a thousand separator, but the normal format functions do not seem to work as expected.
Anyone?
Kind regards
TorB.
Sat, Dec 10 2011 7:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tor,

<< I am trying to format a number from a calculation with 2 decimals and a
thousand separator, but the normal format functions do not seem to work as
expected. >>

The closest to what you need is the FloatToStr function.  Just pass a second
parameter with the number of decimal places.  There isn't an option for
thousands separator, though, so I'll have to add that (if possible).

--
Tim Young
Elevate Software
www.elevatesoft.com
Sun, Dec 11 2011 5:11 AMPermanent Link

Tor J. M. Breines

Hi Tim.
Thank you for your quick reply. It works Smile
But how to change the decimal sign in US "." to the European standard "," ?
Is this possible in EWB?
By the way, I am very impressed by your program and I am very much looking forward to the final release and to get my hands on the docs Smile
This is what I have been looking for, for a very long time.
Kind regards
TorB.

---

The closest to what you need is the FloatToStr function.  Just pass a second
parameter with the number of decimal places.  There isn't an option for
thousands separator, though, so I'll have to add that (if possible).
Sun, Dec 11 2011 10:18 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tor,

<< But how to change the decimal sign in US "." to the European standard ","
? >>

I'll have to look into this.  There's a built-in JavaScript function for
converting a number to locale standards, but it does not allow for
specifying the number of decimal places.

<< By the way, I am very impressed by your program and I am very much
looking forward to the final release and to get my hands on the docs Smile
This is what I have been looking for, for a very long time. >>

Fantastic, thank you. Smile

--
Tim Young
Elevate Software
www.elevatesoft.com
Image