Description
The FLOOR
function rounds a number towards zero to the nearest whole number.
Usage
FLOOR(value)
Argument | Type | Required | Description |
---|---|---|---|
value | Numeric | Yes | The value to round |
Result
The nearest whole number when down (towards zero) from the given value.
Example
When thinking about people's ages, we generally think in whole numbers, and round down. For example, someone who is six months away from their eighteenth birthday is 17.5 years old, but we would normally say they are 17 years old.
You can use the FLOOR
function together with the YEARFRAC and TODAY functions to calculate someone's age in whole numbers:
FLOOR(YEARFRAC(DOB, TODAY()))