NumberFormat() Mask
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 an appropriate 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.5178.51 100 100.00 20.20 37 0.37 Anyone know how to do this? The leading zero seems to be the catch. Jim __ Get the mailserver that powers this list at http://www.coolfusion.com 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
RE: NumberFormat() Mask
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.5178.51 100 100.00 20.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
Re: NumberFormat() Mask
Thanks, Dave. Dunno why I couldn't find it. It ended up being either ___.__ or ___.00. For some reason __0.00 pads the left hand side with up to three zeroes. Go figure. Jim - Original Message - From: Dave Watts [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, April 29, 2002 7:05 PM Subject: RE: NumberFormat() Mask 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.5178.51 100 100.00 20.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 __ Get the mailserver that powers this list at http://www.coolfusion.com 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