Trim problem

A

Ayala

Hi all,

I have a string field which length I don't know (given by
the user), what I know is that the string will have a
number at the beginning and then letters, but I don't know
how many numbers and letters. I need to pick only the
number and save it in other variable. ex.

I get I want
12345adkcvjgr ---> 12345
3dfg ------------> 3
67gfhhted ---------> 67
89765454a ---------> 89765454

The only pattern is that the number will be at the
beginning...



any thoughts?
 
C

Cheryl Fischer

Ayala,

Try the Val() function. It will return the number part of a string, as
long as that number is found at the beginning of the string.

hth,
 
A

Ayala

Thank you very much Cheryl :)
-----Original Message-----
Ayala,

Try the Val() function. It will return the number part of a string, as
long as that number is found at the beginning of the string.

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top