|
-
Feb 20th, 2003, 05:33 PM
#1
Thread Starter
Fanatic Member
Counting digits, extracting numbers (resolved)
I can get the number of digits in an integer in two functions:
Digits = Len(Str(intX)) - 1
But is there a function that does this in one?
also . . .
I have various strings like:
1 day
2 days
14 days
365 days
And I want to extract just the numbers into another string. Is this the slickest way:
strNumber = Replace(strDays, " day", vbNullString)
strNumber = Replace(strDays, "s", vbNullString)
I know I'm quibbling when it could be said, "if it ain't broke... " but I'm just as concerned with creating streamlined code that's easy to read.
Last edited by mikeycorn; Feb 20th, 2003 at 09:43 PM.
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
|