Thanks Claude that works perfect, muchos gracious!
> Try this:
> (Note that for the last one you will get 0s at the end of the integer
> part, this is probably because of an overflow error. If you really
> have such large numbers, a function that works exclusively on the
> string will be needed.)
>
> <CFSCRIPT>
> function thSepar(n)
> {
> var integerPart = numberFormat(listFirst (n, "."), "___,___");
> if(listLen(n, ".") GT 1) return integerPart & "." & listLast(n, ".");
> return integerPart;
> }
> </CFSCRIPT>
> <CFOUTPUT>
> #thSepar(11)#<BR>
> #thSepar(11111.111111111)#<BR>
> #thSepar(11.11)#<BR>
> #thSepar(1.1)#<BR>
> #thSepar(111111111111111111111.11111111111111111111)#<BR>
</CFOUTPUT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351736
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm