heres how I use it now, and it works beautifully...

<cfif #two# = 3>

        <cfset new2="#2ndoctet#">

<cfelseif #two# = 2>

        <cfset new2="#Insert(0, 2ndoctet, 0)#">
        
<cfelseif #two# = 1>
        
        <cfset new2="#Insert(00, 2ndoctet, 0)#">
        
</cfif>

this is part of an ipaddress to number udf that I created
where I want all octets to have 3 places, so I can take 

166.1.14.10 to the value of 166001014010 

that can then be inserted into my db as a bigInt as a unique
identifier for a client.

..tony

Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping & reporting
www.navtrak.net
410.548.2337 

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 27, 2002 11:00 AM
To: CF-Talk
Subject: RE: padding zeros


seth,

look at the insert() function.

.tony

Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping & reporting
www.navtrak.net
410.548.2337 

-----Original Message-----
From: Turetsky, Seth [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 27, 2002 10:55 AM
To: CF-Talk
Subject: padding zeros


I'm displaying an id, which in the long run may change length from say 6
digits to 7.  So to keep it standard, I want to pad a zero in front of
the 6's.  
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?

thanks,
seth

This message is for the named person's use only. It may contain
sensitive and private proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended recipient, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. CREDIT SUISSE GROUP and each legal entity in the
CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business
units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all
e-mail communications through its networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorized to state them to be the
views of any such entity.
Unless otherwise stated, any pricing information given in this message
is indicative only, is subject to change and does not constitute an
offer to deal at any price quoted. Any reference to the terms of
executed transactions should be treated as  preliminary only and subject
to our formal written confirmation.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to