I'm sure there's a nifty function that does exactly that for you - but without looking
in the manual you could always do this:
<!--- Move the calculation over two decimal places, add .5 and truncate, then move it
back --->
<cfset result = ( thisval / thatval * 100 + 0.5 ) \ 100 >
At 03:06 PM 8/23/00 -0400, Peter Benoit wrote:
>Thanks for all the help with this one. One final question would be, is
>there a way to round the results of this to say 2 decimal places?
>
>It's hard to find what you're looking for when you don't know what you're
>looking for! :)
>
>
>Thanks again,
>Pete
>
>* -----Original Message-----
>* From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]
>* Sent: Wednesday, August 23, 2000 2:50 PM
>* To: [EMAIL PROTECTED]
>* Subject: RE: Division in Cold Fusion?
>*
>*
>* Just like you did but you're using the wrong slash it should be.
>*
>* <CFSET MYVAL = thisval / thatval>
>*
>* BTW you also don't need #'s in set's unless the variable
>* name is in ""'s.
>*
>* HTH,
>* --K
>*
>* -----Original Message-----
>* From: Peter Benoit [mailto:[EMAIL PROTECTED]]
>* Sent: Wednesday, August 23, 2000 11:33 AM
>* To: '[EMAIL PROTECTED]'
>* Subject: Division in Cold Fusion?
>*
>*
>* I must be looking at all the wrong stuff... but I want to
>* take 2 values and
>* divide them.
>*
>* like:
>*
>* <cfset myval = #thisval# \ #thatval#>
>*
>* Is there a correct way to do this?
>*
>* Thanks,
>* Pete
>*
>* -------------------------------------------------------------
>* ---------------
>* --
>* Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>* To Unsubscribe visit
>* http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lis
>ts/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>----------------------------------------------------------------------------
>--
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.