thanks everybody, my brain is still on vacation. i did notice though, that if the number is bigger than what you format it as, it chops it, so i'll do some checking beforehand, but it would take a long time to pass what i pad it with.
-----Original Message----- From: Larry Juncker [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 11:10 AM To: CF-Talk Subject: RE: padding zeros Another thing you can do if all you want is to keep the format at 7 is use NumberFormat with 9's as below to pad spaces and not 0's. 1234 NumberFormat(1234,"9999999") will display as 1234 whereas NumberFormat(1234,"0000000") will display as 0001234 Just my two cents worth Larry Juncker Senior Cold fusion Developer Heartland Communications Group, Inc. [EMAIL PROTECTED] (515) 574-2122 CONFIDENTIALITY NOTICE The information contained in this e-mail is intended only for the use of the individual or entity to which it is addressed. This e-mail may contain information that is privileged, confidential and/or personal. If the reader of this message is not the intended recipient (or the employee or agent responsible to deliver it to the intended recipient), you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this communication in error, please notify us at the e-mail listed above. -----Original Message----- From: Scott Brady [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 10:05 AM To: CF-Talk Subject: Re: padding zeros >Would this be done with numberformat or should i grab the length of the id and loop spitting out the number of zero's i want? Yes, I'd use NumberFormat. However, make sure your numberformat mask has enought digits for future use. I believe that if you have numberformat(mynumber,"00000") and if mynumber has more than 5 digits, CF will throw an error. So, if you're sure that 7 will be the max. number of digits (of course, you can always change it later), then you'd do something like: #NumberFormat(mynumber,"0000000")# Scott -------------------------------- Scott Brady http://www.scottbrady.net/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

