|
-
Nov 11th, 2002, 11:36 AM
#1
Thread Starter
Frenzied Member
Extract the first 6 characters of a string
How can I extract the first 6 characters of a string?
e.g.
str1 = "abcdefghijklmnopqrstu"
=>str2 = "abcdef"
-
Nov 11th, 2002, 11:37 AM
#2
Frenzied Member
Code:
str2 = Left(str1,6)
-
Nov 11th, 2002, 02:48 PM
#3
Fanatic Member
If performance will become an issue one day, you can better use Left$(str1,6). This will return a string value, while the Left function returns a variant value, which is converted to a string afterwards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|