![]() | clearString neatComponents
|
| |
Expressions - Function Reference |
![]() | ||
![]() | Data Integration | ![]() |
Expressions - Function Reference |
![]() | ![]() |
Expressions can contain the following functions.
Functions can be combined using the Operators, and can be nested.
Functions are grouped in the following categories:
COALESCE(value1, value2[, value10])
Returns the first non-null value. Can be used as a 'NullToZero' function if the second parameter is 0.
IIF(condition, truevalue, falsevalue)
If [condition] evaluates to true, null, return [truevalue] otherwise return [falsevalue]
DATEDIFF(datetime1, datetime2)
Returns [datetime1] - [datetime2] in days
Also see Extended use example below...
DATE_FORMAT(datetime, format)
Formats [datetime] according to [format]
DAY(datetime)
Day of month of [datetime] (1-31)
HOUR(datetime)
Hour of [datetime] (0-23)
INTERVAL(integer,[YEAR|MONTH|DAY|HOUR|MINUTE|SECOND])
Returns an interval that can be added to / subtracted from a date / time
Note: In an expression the Interval should be placed after the date ie Date + Interval, not Interval + Date
MINUTE(datetime)
Minute of [datetime] (0-59)
MONTH(datetime)
Month of [datetime] (1-12)
NOW()
Current date and time
SECOND(datetime)
Second of [datetime] (0-59)
UTC_TIMESTAMP()
Current UTC date and time
ABS(number)
Absolute value
ACOS(number)
Inverse cosine
ASIN(number)
Inverse sine
ATAN(number)
Inverse tangent
CEIL(number)
Smallest integer not less than argument
COS(number)
Cosine
COT(number)
Cotangent
DEGREES(number)
Radians to degrees
EXP(number)
Exponential
FLOOR(number)
Largest integer less than argument
LN(number)
Natural logarithm
LOG(number1, number2)
Logarithm to base [number2]
MOD(number1, number2)
Remainder of [number1] / [number2]
PI()
Pi constant
POWER(number1, number2)
[number1] raised to the power [number2]
RADIANS(number)
Degrees to radians
RANDOM()
Returns a random value in the range 0.0 <= x < 1.0
ROUND(number, precision)
Round to [precision] decimal places
SIGN(number)
Sign of the argument (-1, 0, 1)
SIN(number)
Sine
SQRT(number)
Square root
TAN(number)
Tangent
CONST.CURRENTSITE.URL()
Returns the domain name of the site. If the site is listening on multiple domain names, it will return the domain name that is being used by this particular request.
LEFT(text, length)
Return first [length] characters in the string
LOWER(text)
Convert text to lower case
LTRIM(text)
Remove leading spaces
REPEAT(text, number)
Repeat [text] the specified [number] times
REPLACE (string,find,replace)
Replaces instances in the [string] of the [find] text with the [replace] text
REVERSE(text)
Return reversed string
RIGHT(text, length)
Return last [length] characters in the string
RTRIM(text)
Remove trailing spaces
SUBSTR(text, start[, length])
Return [length] characters from character [start] in the string
TRIM(text)
Remove leading and trailing spaces
UPPER(text)
Convert text to upper case
Conditional expressions can be extended by combination.
For example, DATEDIFF only calculates the difference between two date-times in whole numbers of days. If you need to calculate the difference in a number of hours you can use DATEDIFF in combination with the HOUR() function as follows:
(DATEDIFF([t:hour difference]![finish time], [t:hour difference]![start time]) * 24) + (HOUR([t:hour difference]![finish time]) - HOUR([t:hour difference]![start time]))
|