> Is it possible to remove a digit from a multi-digit number IE:
> 2007 would become 207?

You would have to treat the number as a string, loop over it and
rebuild the string excluding that particular character or digit space.

For your particular example:

<cfset OldValue = "2007">
<cfset NewValue = "">
<cfloop from="1" to="#Len(OldValue)#" index="x">
<cfif x NEQ 3>
<cfset NewValue = NewValue & Mid(OldValue, x, 1)>
</cfif>
</cfloop>

<cfoutput>#OldValue# vs #NewValue#</cfoutput>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288293
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to