abs - Take absolute value of a number
Returns the absolute value of number
. Useful for computing the total difference between two values.
Syntax
Like many functions in DataPrime, abs
supports two notations, function and method notation. These interchangeable forms allow flexibility in how you structure expressions.
Arguments
Name | Type | Required | Description |
---|---|---|---|
number | number | true | The value which will be made positive |
Example: The difference between two timestamp fields
In this example, a new field is made called time_difference
that is populated by the numerical difference between a field first_timestamp
and second_timestamp
. The use of the abs
function means the user doesn't need to know which timestamp is greater.
Theme
Light