trimming a variable.

M

mario c

I need to trim a variable to have everything after 4 chars in a string.

IE:

var_temp = 200:16:1234567890

i want everything after 200: to be a variable.

I cannot use:

var_new = right(var_temp,14)

because the string is a different length everytime.
I just dont know this function. please help :D

Mario C
 
S

SPA

Use the mid function in vbscript
Mid(string, start[, length])

var_string = mid(var_temp, 5)

If you know the length of how much you need to extract after the 4th
character, you can specify that too

HTH

SPA
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top