Count Left from First charater (1 Viewer)

james_halliwell

Registered User.
Local time
Today, 04:33
Joined
Feb 13, 2009
Messages
211
Hi All,

Trolled the internet but didn't find anything that would help,

I would like to count the characters before the "-"

for example

12345678-1 (this would be a count of 8 as its 8 characters long taking off the -1

9876541-1 (this would be a count of 7 characters long taking off the -1)

Any advice would be greatly appreciated
 

essaytee

Need a good one-liner.
Local time
Today, 15:33
Joined
Oct 20, 2008
Messages
512
Code:
? instr("123-456","-")
 4
So for your example, then minus 1 from the result.
 

james_halliwell

Registered User.
Local time
Today, 04:33
Joined
Feb 13, 2009
Messages
211
Code:
? instr("123-456","-")
 4
So for your example, then minus 1 from the result.

Many thanks, I think I miss understood the MSN website

Appreciate you taking the time to help
 

Users who are viewing this thread

Top Bottom