You can use...

<cfset myNumber = round(myNumber * 100)/100>

To get you desired formatting. 

--
Jay

> -----Original Message-----
> From: Peterson, Andrew S. [mailto:[EMAIL PROTECTED] 
> Sent: 24 November 2004 15:20
> To: CF-Talk
> Subject: Easy NumberFormat Question
> 
> Hello,
>  
> Is there a number formatting function that will show a 
> maximum of two decimal places when a remainder exists and no 
> decimal places if it doesn't exist? Right now I'm using 
> numberformat and it's showing two decimal places when there 
> is no remainder. I'd just like for those cases to show up as 
> X, not X.00.
>  
> The last time I did something like this, I did an if 
> statement to check for the remainder and formatted 
> correspondingly. I think that was CF 5.
> Does a function exist for this? 
>  
> Thanks in advance!
>  
> Sincerely,
>  
> Andrew
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185302
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to