3

Is there any way I can eliminate decimals without approximating the number?

Example:

 Value    | Desired output
 1.69     | 1
 2.12     | 2
 105.9999 | 105 

I want to use the field calculator for this. Do you have any suggestions?

7

The expression floor(your number here) does what you are looking for. For more details check the documentation.

1
  • One thing to be aware of, though: If an integer is approximated by a float, e.g. 123455.99999999 for 123456, using floor() will convert it to 123455. – Eric Duminil Mar 10 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.