|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Splitting A Variable Into Parts |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|