RE: Rounding an integer to X.XX
by "Campbell, Rebecca" <Rebecca.Campbell(at)converg.com>
|
| Date: |
Wed, 31 May 2000 11:48:54 -0600 |
| To: |
"'Francois de Beer'" <fbeer(at)sars.gov.za>, Hwg-Techniques <hwg-techniques(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
have you gotten a reply on this?
the last one is a simple Math.round(), which will simply round up to the
nearest integer. i think for the first two, you would get the desired
results if you were to use split(), parse off the first two or three numbers
after the decimal point, and then concatenate the string back together.
let me know if you need more info than that...
hth,
rebecca
http://www.nerdygirl.com
-----Original Message-----
From: Francois de Beer [mailto:fbeer(at)sars.gov.za]
Sent: Wednesday, May 31, 2000 4:04 AM
To: Hwg-Techniques
Subject: Rounding an integer to X.XX
Hi all
How do I convert: 0123.0932457723 to: 123.09 with J-Script?????
OR
How do I convert: 0123.1972457723 to: 123.20 with J-Script?????
AND
How do I convert: 0123.0932457723 to: 123 with J-Script?????
Any Help will be appreciated
Thanx.
Beer
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.