> Can anyone help me with this hair pulling exercise.
>
> I've been working on a Bonus Penalty/Levy calculator where most
computations
> involve rounding - not a problem.
>
> In one spot the calculation needs to be truncated, not rounded, to 3
decimal
> places - how do I do this? Please help!
>
> Example:
>
> 9.9976 would become 9.998 when #NumberFormat(Variable, "9.999")# is
applied
> but I need it to be 9.997
>
>
> +++++++++
> Kevin Parker
> Service and Communication
> WorkCover Corporation


This will work...

<cfset MyNum = 9.9976>
<cfoutput>#left(MyNum, (Find(".",MyNum)+3))#</cfoutput>

HTH,
Steve

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
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.

Reply via email to