Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Mid function help needed
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 02 November 2007 :  09:11:18  Show Profile
6408373-SALE-11/1/2007

From string, i want to extract "SALE"

How to do it using mid and Instr ?


Also,

6408373-DECLINE-11/1/2007

From string, i want to extract "DECLINE".

How to do it using mid and Instr ?

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 02 November 2007 :  09:31:24  Show Profile  Visit HuwR's Homepage
That depends what you mean by "extract" ie what do you want to accomplish by extracting SALE or DECLINE ?

probably best to try something like
ResultArr = Split("6408373-SALE-11/1/2007","-")

this will give you an array where
ResultArr[0] = "6408373"
ResultArr[1] = "SALE"
ResultArr[2] = "11/1/2007"

so it would be easier to get at the seperate values using Split rather than Instr and Mid, but like I said it depends what you actually want to do
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 02 November 2007 :  15:38:55  Show Profile
ResultArr ... Awesome!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07