Numeric functions are Math Functions menu. They operate on numeric values to round numbers up or down, truncate them, or determine whether the number is negative or positive. These functions are available for every data provider except for raster, WFS, and WMS providers.
When you create an expression for geospatial features, you can use the following numeric functions:
Function | Definition | Syntax | Example |
---|---|---|---|
CEIL |
Rounds a number up to the next highest integer. The return value uses the input data type. For example, CEIL(2.6)=3 CEIL(-2.6)=-2 |
CEIL(Numeric_Property) |
CEIL(Part_Cost) |
FLOOR |
Rounds a number down to the next lowest integer. The return value uses the input data type. For example, FLOOR(2.6)=2 FLOOR(-2.6)=-3 |
FLOOR(Numeric_Property) |
FLOOR(Part_Cost) |
ROUND |
Rounds a number to the specified decimal places. The return value uses the input data type. For example, ROUND(1.476,2)=1.48 |
ROUND(Numeric_Property], Number of decimal places) |
ROUND(Part_Cost,2) |
SIGN |
Finds the sign of a number. Returns 1 if the number is positive; 0 if the number is 0; -1 if the number is negative. The return value uses an Int16 data type. For example, SIGN(-3.76)=-1 |
SIGN(Numeric_Property) |
SIGN(Parcel_Sale_Profit) |
TRUNC |
Truncates a date property to the specified format ('YEAR', 'MONTH', 'DAY', 'HOUR' or 'MINUTE') or Truncates a numeric property to the specified number of decimal places. The return value uses the input data type. For example, TRUNC(1.476, 2)=1.47 This function returns a DOUBLE. |
TRUNC(Date_Property, 'Format') TRUNC(Numeric_Property, Number of decimal places) |
TRUNC(Repair_Date, 'DAY') or TRUNC(Repair_Cost, 2) |