Seperating Whole Numbers and Decimal Numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using vb in access 2003 i end up with a value of 1.006

i need to get the 1 on its own and the 006 on its own. Is there a function
that will remove the numbers to the left of the decimal point and to the
right of the decimal point?
 
The Fix function will remove the decimal portion (there's also the Int
function. The difference is how they treat negative values: Int returns the
first negative integer less than or equal to the number, while Fix returns
the first negative integer greater than or equal to number).

Once you've got the integer part of the number, subtract it from the
original number to get the decimal portion.
 
Once Again, Many Thanks Douglas

Douglas J. Steele said:
The Fix function will remove the decimal portion (there's also the Int
function. The difference is how they treat negative values: Int returns the
first negative integer less than or equal to the number, while Fix returns
the first negative integer greater than or equal to number).

Once you've got the integer part of the number, subtract it from the
original number to get the decimal portion.
 
Back
Top