ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 2nd, 2006, 05:44 AM
doof92 doof92 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 73 doof92 User rank is Lance Corporal (50 - 100 Reputation Level)doof92 User rank is Lance Corporal (50 - 100 Reputation Level)doof92 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 20 h 44 sec
Reputation Power: 3
Splitting A Variable Into Parts

Hello,
I have a variable named DressCode. The content of this variable is something like N040602
I want to split this variable into four parts:
DressCodea would be the N part
DressCodeb would be the 04 part
DressCodec would be the 06 part
DressCoded would be the 02 part
How do you do this is ASP, so it'll split the variable, no matter what the content is, as long as it is that format (ie 1 letter then 6 numbers)
Thanks for your help

Reply With Quote
  #2  
Old September 2nd, 2006, 01:25 PM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
Click here for more information.
 
Join Date: Feb 2005
Location: Dreamland
Posts: 12,813 mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)mehere User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 4 Months 4 Weeks 1 h 18 m 54 sec
Reputation Power: 1567
you need to split it manually ... you could also create a function that will do this. but use the right, left and mid functions
Code:
strValue = "N040602"
strLetter = left(strValue,1)
strNumber1 = mid(strValue,2,2)
strNumber2 = mid(strValue,4,2)
strNumber3 = right(strValue,2)
__________________
Come JOIN the party!!!

Quote of the Month:
Risks: If you never try anything new, you'll miss out on many of life's great disappointments.

Questions to Ponder:
Is there another word for synonym?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright© 2008 sbenj69

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Splitting A Variable Into Parts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway