Re: Thousand Separator ONLY

2012-06-27 Thread Richard White
Hey Jason, yes tried it but it adds a decimal to numbers that were previously integers, or with numbers that have 5 decimals for example it rounds it to one decimal Did you try numberFormat(myNum, ,9.9) ? On 6/27/2012 1:34 PM, Richard White wrote:

Re: Thousand Separator ONLY

2012-06-27 Thread Richard White
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.)

Thousand Separator ONLY

2012-06-26 Thread Richard White
Hi, is there any way to take any integer or float and add thousand separators without having to specify or change the decimal places thanks ~| Order the Adobe Coldfusion Anthology now!

RE: Thousand Separator ONLY

2012-06-26 Thread Robert Harrison
PM To: cf-talk Subject: Thousand Separator ONLY Hi, is there any way to take any integer or float and add thousand separators without having to specify or change the decimal places thanks ~| Order the Adobe Coldfusion

Re: Thousand Separator ONLY

2012-06-26 Thread Richard White
To: cf-talk Subject: Thousand Separator ONLY Hi, is there any way to take any integer or float and add thousand separators without having to specify or change the decimal places thanks ~| Order the Adobe Coldfusion

RE: Thousand Separator ONLY

2012-06-26 Thread Robert Harrison
I believe you do your own format mask? I don't know the length of your number, but I think NumberFormat(myvar,__,___.__) would work to cover most any number you throw at it. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I 

Re: Thousand Separator ONLY

2012-06-26 Thread Christopher Watson
Kinda thought that's what the DecimalFormat function was all about. -Chris Hi, is there any way to take any integer or float and add thousand separators without having to specify or change the decimal places thanks

Re: Thousand Separator ONLY

2012-06-26 Thread Richard White
thanks for your help Robert although that didnt work as it returns lots of zeros after the decimal place. for example: 112221.111 got changed to 112,221.111000 thanks I believe you do your own format mask? I don't know the length of your number, but I think

Re: Thousand Separator ONLY

2012-06-26 Thread Christopher Watson
Kinda thought that's what the DecimalFormat function was all about. But now I am reminded that the DecimalFormat function always returns the two decimal places, in addition to the thousands separators. So, I would just run that result through a REReplace and be done with it: cfset

Re: Thousand Separator ONLY

2012-06-26 Thread Jason Fisher
numberFormat(myNum, ,9) From: Richard White rich...@re-base.net Sent: Tuesday, June 26, 2012 12:59 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Thousand Separator ONLY thanks for your help Robert although that didnt work as it returns lots

Re: Thousand Separator ONLY

2012-06-26 Thread Richard White
thanks Jason, although this strips off all the decimals numberFormat(myNum, ,9) thanks for your help Robert although that didnt work as it returns lots of zeros after the decimal place. for example: 112221.111 got changed to 112,221.111000 thanks com/austin_

Re: Thousand Separator ONLY

2012-06-26 Thread Richard White
thanks Chris, i get an error when using the regular expression that says the number 112221.111 cannot be converted to a number this looks to be an interesting challenge for all of us! :) Kinda thought that's what the DecimalFormat function was all about. But now I am reminded that the

Re: Thousand Separator ONLY

2012-06-26 Thread Jason Fisher
Then try numberFormat(myNum, ,9.9) From: Richard White rich...@re-base.net Sent: Tuesday, June 26, 2012 1:15 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Thousand Separator ONLY thanks Jason, although this strips off all the decimals

Re: Thousand Separator ONLY

2012-06-26 Thread Richard White
I think i may need to be clearer on what i am trying to achieve: I have any form of number, they could be integer or floats and with varying decimal places such as: 11 1.1 11.11 1.1 1. etc I need to have a function that simply adds the

Re: Thousand Separator ONLY

2012-06-26 Thread Claude Schnéegans
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 =

Re: Thousand Separator ONLY

2012-06-26 Thread Jason Fisher
Did you try numberFormat(myNum, ,9.9) ? On 6/27/2012 1:34 PM, Richard White wrote: I think i may need to be clearer on what i am trying to achieve: I have any form of number, they could be integer or floats and with varying decimal places such as: 11 1.1 11.11 1.1