abs
Description
Returns the absolute value of a number. Useful for computing the total difference between two values without regard to sign.
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 to convert to a positive number |
Example
Use case: Calculate the difference between two timestamps Generate a time_difference
field based on two timestamp values. Using abs
avoids worrying about which timestamp is greater.
Output
Theme
Light