numberFormat: <cfset num = 50> <cfoutput>#numberFormat(num,"00000")#</cfoutput>
======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email : [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Rahmin Pavlovic [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 30, 2003 11:27 AM > To: CF-Talk > Subject: padding numbers > > > I have a series of numeric codes that can be up to 5-digits > > I'm keeping it as an integer to keep the table small > > but when I display it, I need to lead w/zero's, padding the > number up to 5-digits > > So 6 becomes 00006, and 374 becomes 00374 > > Right now I'm looping through the length of each string, > prepending 0's, but I'm sure there's an easier way > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

