Pull Out Section of a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fperri
    New Member
    • May 2007
    • 88

    Pull Out Section of a string

    I have a variable with a value....say 4740142.910874 as a string. I'm trying to grab what comes after the decimal point - the 910874. Right now this is my code;

    numOne = Right(numString , InStr(numString , ".")

    But its returning me 2.910874

    I've figured out that its because it is returning exactly the number of characters from the begining of the string to the decimal point from the right. How can I code this to get it to do what I want it to? Is there anyway to have it return only what comes after the decimal point?
  • fperri
    New Member
    • May 2007
    • 88

    #2
    Originally posted by fperri
    I have a variable with a value....say 4740142.910874 as a string. I'm trying to grab what comes after the decimal point - the 910874. Right now this is my code;

    numOne = Right(numString , InStr(numString , ".")

    But its returning me 2.910874

    I've figured out that its because it is returning exactly the number of characters from the begining of the string to the decimal point from the right. How can I code this to get it to do what I want it to? Is there anyway to have it return only what comes after the decimal point?

    Nevermind.....I found it....the MID().....sorry

    Comment

    Working...