abs
Derives the absolute value. Functional behavior depends on basic data types provided:
data type | Description |
---|---|
numeral | Turns number positive |
string | Returns 0 all time |
date | Returns Microsoft Excel serial date. If time is provided, then time is the fraction of the day (e.g. 0.5 for 12:00 noon time). |
boolean | Returns 0 if false, 1 if true |
parameter set | Activates indirect parameter passing. Parameter set must contain 1 element of type described above. |
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | Value Value to convert to absolute value |
Type | Description |
---|---|
numeral | Absolute value Absolute value as calculated using rules described above |
echo( abs(-1) );
echo( abs(true) );
echo( abs(Hello World) );
echo( abs(date(today)) );
echo( abs(date(now)) );
echo( abs(time(now)) );
1
1
0
45487
45487.4227199074
0.4227199074