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)
 Splitting topic subject
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 07 April 2007 :  04:20:14  Show Profile  Send StephenD a Yahoo! Message
My T_SUBJECT values are stored as 'Bloggs, Joe 6161/2007'

I'm trying to extract the surname and firstnames sperately and am running into trouble.


if inStr(Topic_Subject,",") <> 0 then
   array1 = split(Topic_Subject,",")
newArray = ""

For a = 0 to Ubound(array1)
	array2 = Split(array1(a)," ,")
Next




AnonJr
Moderator

United States
5768 Posts

Posted - 07 April 2007 :  09:33:33  Show Profile  Visit AnonJr's Homepage
If the values are consistently stored as "LName, FName mm/dd/yyyy" then you may just find it easier to split on the space and trim the comma from the last name. This is assuming that you are following the indicated format (spacing and all), here's a rough first run:
array1 = Split(Topic_Subject," ")
LName = Trim(Replace(array1(0),",",""))
FName = Trim(array1(1))
Date = cDate(array1(2))


Or something along those lines depending on what you needed. Or maybe I just need another cup of coffee....
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 08 April 2007 :  20:34:39  Show Profile  Send StephenD a Yahoo! Message
Thanks for that AnonJr, worked perfect.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 09 April 2007 :  12:24:29  Show Profile  Visit AnonJr's Homepage
Glad to help.
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.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07