Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
xSeanx #1
Rounding decimal places
What is the best and most acurate way to round a number to 2 decimal places.
It has the be a correctly rounded number not just a mask..
eg: round 3.347 to 3.35
xSeanx Guest
-
Truncate a decimal pointed figure without rounding ...
How can I get -0.162058 to -0.1 rather than rounding to -0.2? I know I'm being stupid here, but it's really bugging me. The number before the... -
Rounding to 2 decimal places
I have this placed in my code <%Response.write(Session("MembershipCost"))%> the number it contains is 605 how do i use the round Function to... -
Decimal places!
Hi fellow Director users!, I had a countdown timer (75 seconds) for a game, and I wanted to display the time taken to complete it, in a field. ... -
Rounding up anything past the decimal point sprintf
Hi all How can I round a number up if there is any value other than 00 after the decimal point here is what I have: my $count = "5"; my $item... -
do not cut decimal places
Hi, following problem (oracle8): I want to insert a value with precision (#.##) in a number(10,2) column. It works but the values which end with... -
Stressed_Simon #2
Re: Rounding decimal places
<cfset FullNumber = 3.5432267>
<!--- round to 2 decimal places --->
<cfset RoundedNumber = FullNumber * 100>
<cfset RoundedNumber = Round(RoundedNumber )>
<cfset RoundedNumber = RoundedNumber / 100>
Stressed_Simon Guest
-
xSeanx #3
Re: Rounding decimal places
that method doesn't seem to work with something like 3.50, it keeps outputting it to 3.5
xSeanx Guest
-
Stressed_Simon #4
Re: Rounding decimal places
That is correct behaviour of a numerical variable. Normally the only reason why you would want the full 2 decimal placs is for currency. If this is the case use LSCurrencyFormat().
Stressed_Simon Guest



Reply With Quote

