Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    chicago
    Posts
    26

    Question Unanswered: isolating the decimal

    I am trying to isolate the decimal portion of a number from its whole number in a query.

    I thought of MID, but the decimal point is not always at a fixed point

    I want .6333 from 78.6333
    .5 from 489.5

    Any help would be appreciated. Thanks.

  2. #2
    Join Date
    Feb 2004
    Posts
    142
    =mid(strName,Instr(1,strName,".")+1)

    in the mid statement do the instr search for the decimal, and add 1 to determine where to start the slice.
    KC

  3. #3
    Join Date
    Feb 2004
    Posts
    142
    Originally posted by AZ KC
    =mid(strName,Instr(1,strName,".")+1)

    in the mid statement do the instr search for the decimal, and add 1 to determine where to start the slice.
    The +1 will not take the decimal, if you want it then leave out the +1
    KC

  4. #4
    Join Date
    Mar 2004
    Location
    chicago
    Posts
    26
    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •