Obviously, NumberFormat expects the argument to be an unformatted number, not one containing commas. To achieve what you want, why not:
NumberFormat(NumberFormat((attributes.pAAS_SCORE + attributes.pDRS_TOTAL), ".__"), "._")


--
Regards: Ayudh

+----------------------------------------------------------------+
| SOAP is the glue! Hook up your server directly to your bank.   |
| Connect to VeriPay xServ, the Australian Payments Web Service. |
| Reliable, Secure, FAST: http://www.xilo.com/xserv              |
+----------------------------------------------------------------+


[EMAIL PROTECTED] wrote:
Has anyone come across this problem... as it seems to be a bug in CF ->

NumberFormat(DecimalFormat(attributes.pAAS_SCORE + attributes.pDRS_TOTAL),"._") = 
INVALID

The reason... Number format doesn't like ","... how bezaar. I thought a comma was a 
legitimate character

As you will not I had to use Replace for it... kinda of a hack. And plus I need the 
return value in that way. Number rounded to the least significant 2 value, than 
returned with just one...


eg: 1234.56789 will be returned as 1234.6 or a better example 1234.5455 will be returned as 1234.6


any ideas?

thanks
tibs



Here is a code snippet

<cfparam name="attributes.pAAS_SCORE"      default="0">
<cfparam name="attributes.pDRS_TOTAL"      default="0">

<!--- <cfoutput>
#attributes.pAAS_SCORE#
#attributes.pDRS_TOTAL#
#NumberFormat(1,208.00)#<!--- invalid --->
#NumberFormat(1208.00)#<!--- valid --->
</cfoutput>
<CFABORT> --->

<cfset pMARK_TOTAL = NumberFormat(Replace(DecimalFormat(attributes.pAAS_SCORE + 
attributes.pDRS_TOTAL),",",""),"._")><!--- Rounded up to one decimal point --->

<cfset caller.pMARK_TOTAL = pMARK_TOTAL>


--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/





---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to