Re: round up
From: Evertjan. (exjxw.hannivoort_at_interxnl.net)
Date: 02/19/04
- Next message: Bob Barrows [MVP]: "Re: round up"
- Previous message: Peter Foti: "Re: round up"
- In reply to: joeandtel: "round up"
- Messages sorted by: [ date ] [ thread ]
Date: 19 Feb 2004 00:01:58 GMT
=?Utf-8?B?am9lYW5kdGVs?= wrote on 18 feb 2004 in
microsoft.public.inetserver.asp.general:
> If I have a value that is 53.123499999, how can I round it to 53.12?
The old and safe way:
n = 53.123499999
n = int( n * 100 + 0.5 ) / 100
n = int(n) / 100
Response.Write FormatNumber(n,2)
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
- Next message: Bob Barrows [MVP]: "Re: round up"
- Previous message: Peter Foti: "Re: round up"
- In reply to: joeandtel: "round up"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|