MID function from the right? 
Author Message
 MID function from the right?

Can a range of characters be selected using the MID function from right to
left? This is what I have:

 36068212     I want to select only the 0682
417263312     I want to select only the 2633
 186                I want to select only the 1

After that I will need to select the 36  and the 417 for a different field.

The numbers actually appear as 36068212.00, 417263312.00 and 186.00. I
format them on the page and drop the zeroes and decimal.  Thanks.



Wed, 29 Sep 2004 19:14:37 GMT  
 MID function from the right?
You can use something like:
mid(Yournumber,lenght(totext(Yournumber))-5,4)
example
mid(36068212,lenght(totext(36068212))-5,4)= 0682

verify what to do with formatting

hope this helps

Luisa

Quote:

> Can a range of characters be selected using the MID function from right to
> left? This is what I have:

>  36068212     I want to select only the 0682
> 417263312     I want to select only the 2633
>  186                I want to select only the 1

> After that I will need to select the 36  and the 417 for a different field.

> The numbers actually appear as 36068212.00, 417263312.00 and 186.00. I
> format them on the page and drop the zeroes and decimal.  Thanks.



Fri, 01 Oct 2004 18:43:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. String extract functions, left,right.mid don't work

2. Mid, Left, Right String functions fail if any library is missing

3. LEFT,RIGHT, and MID Functions

4. mid/left/right equivs??

5. Speed difference -- mid/left/right

6. LEFT$, RIGHT$, MID$ Equivalents?

7. Right$ ,left$ mid$ don't work anymore

8. Left$,Mid$,Right$

9. ??? Totally lost - right - mid - instr

10. MID and RIGHT errors

11. mid and mid$

12. Mid/Mid$ Statement sucks

 

 
Powered by phpBB® Forum Software