> I need to display a column of percentages, formatted with 
> 2 digits following the decimal place and one, two, or three 
> to the left. I need numbers less than 1 formatted with a 
> leading zero. I'm having a time finding anappropriate 
> NumberFormat() mask to do this. I'm assuming there is one,
> which could well be wrong.
> 
> Number   Formatted
> 1.23          1.23
> 33.4         33.40
> 78.51        78.51
> 100         100.00
> 2            0.20
> 37           0.37
> 
> Anyone know how to do this? The leading zero seems to be 
> the catch.

Try this:

NumberFormat(myval, "__0.00")

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to