Skip to content

Functions

Shaun Lawrence edited this page Aug 27, 2019 · 1 revision

Expressive comes with a comprehensive set of pre-defined functions. These are detailed below:

Date

Function AddDays
Usage AddDays(#2017-01-30#, 2)
Description Returns the supplied date with the specified number of days added.
Remarks Expects exactly 2 parameters.
Function AddHours
Usage AddHours(#2017-01-30 00:00:00#, 2)
Description Returns the supplied date with the specified number of hours added.
Remarks Expects exactly 2 parameters.
Function AddMilliseconds
Usage AddMilliseconds(#2017-01-30 00:00:00.000#, 2)
Description Returns the supplied date with the specified number of milliseconds added.
Remarks Expects exactly 2 parameters.
Function AddMinutes
Usage AddMinutes(#2017-01-30 00:00:00#, 2)
Description Returns the supplied date with the specified number of minutes added.
Remarks Expects exactly 2 parameters.
Function AddMonths
Usage AddMonths(#2017-01-30#, 2)
Description Returns the supplied date with the specified number of months added.
Remarks Expects exactly 2 parameters.
Function AddSeconds
Usage AddSeconds(#2017-01-30 00:00:00#, 2)
Description Returns the supplied date with the specified number of seconds added.
Remarks Expects exactly 2 parameters.
Function AddYears
Usage AddMonths(#2017-01-30#, 2)
Description Returns the supplied date with the specified number of months added.
Remarks Expects exactly 2 parameters.

Function DayOf
Usage DayOf(#2017-01-30#)
Description Returns the day component of the supplied date.
Remarks Expects exactly 1 parameter.
Function HourOf
Usage DayOf(#2017-01-30 00:00:00#)
Description Returns the hour component of the supplied date.
Remarks Expects exactly 1 parameter.
Function MillisecondOf
Usage MillisecondOf(#2017-01-30 00:00:00.000#)
Description Returns the millisecond component of the supplied date.
Remarks Expects exactly 1 parameter.
Function MinuteOf
Usage MinuteOf(#2017-01-30 00:00:00#)
Description Returns the minute component of the supplied date.
Remarks Expects exactly 1 parameter.
Function MonthOf
Usage MonthOf(#2017-01-30 00:00:00#)
Description Returns the month component of the supplied date.
Remarks Expects exactly 1 parameter.
Function SecondOf
Usage SecondOf(#2017-01-30 00:00:00#)
Description Returns the second component of the supplied date.
Remarks Expects exactly 1 parameter.
Function YearOf
Usage YearOf(#2017-01-30 00:00:00#)
Description Returns the year component of the supplied date.
Remarks Expects exactly 1 parameter.

Function DaysBetween
Usage DaysBetween(#2017-01-01#, #2017-01-30#)
Description Returns the number of days between the specified 2 dates.
Remarks Expects exactly 2 parameters.
Function HoursBetween
Usage HoursBetween(#2017-01-01 00:00:00#, #2017-01-30 00:00:00#)
Description Returns the number of hours between the specified 2 dates.
Remarks Expects exactly 2 parameters.
Function MillisecondsBetween
Usage MillisecondsBetween(#2017-01-01 00:00:00#, #2017-01-30 00:00:00#)
Description Returns the number of milliseconds between the specified 2 dates.
Remarks Expects exactly 2 parameters.
Function MinutesBetween
Usage MinutesBetween(#2017-01-01#, #2017-01-30#)
Description Returns the number of minutes between the specified 2 dates.
Remarks Expects exactly 2 parameters.

** MonthsBetween - not yet implemented due to the inprecise duration of a month **

Function SecondsBetween
Usage SecondsBetween(#2017-01-01#, #2017-01-30#)
Description Returns the number of seconds between the specified 2 dates.
Remarks Expects exactly 2 parameters.

** YearsBetween - not yet implemented due to the inprecise duration of a year **

Mathematical

Function Abs
Usage Abs(-1)
Description Returns the absolute value of a number.
Remarks Expects exactly 1 parameter.
Function Acos
Usage Acos(1)
Description Returns the angle whose cosine is the specified number.
Remarks Expects exactly 1 parameter.
Function Asin
Usage Asin(0)
Description Returns the angle whose sine is the specified number.
Remarks Expects exactly 1 parameter.
Function Atan
Usage Atan(0)
Description Returns the angle whose tangent is the specified number.
Remarks Expects exactly 1 parameter.
Function Average
Usage Average(1,2,3,4,5,6)
Description Returns the mean average out of the supplied numbers.
Remarks Expects at least 1 parameter.
Function Ceiling
Usage Ceiling(1.5)
Description Returns the smallest integral value that is greater than or equal to the specified number.
Remarks Expects exactly 1 parameter.

** Still to be converted**

Function Usage Parameters
Cos Cos(0) Expects exactly 1 parameter.
EndsWith EndsWith('end') Expects exactly 1 parameter.
Exp Exp(0) Expects exactly 1 parameter.
Floor Floor(1.5) Expects exactly 1 parameter.
IEEERemainder IEEERemainder(3, 2) Expects exactly 2 parameters.
If If(1 == 1, 'true', 'false') Expects exactly 3 parameters.
In In(1, 1, 2, 3, 4) Expects at least 2 parameters.
Log Log(1, 10) Expects exactly 2 parameters.
Log10 Log10(1) Expects exactly 1 parameter.
Max Max(1, 2) Expects at least 1 parameter.
Mean Mean(1, 2) Expects exactly 2 parameters.
Median Median(1, 2) Expects exactly 2 parameters.
Min Min(1, 2) Expects at least 1 parameter.
Mode Mode(1, 2) Expects exactly 2 parameters.
PadLeft PadLeft([number], 3, '0') Expects exactly 3 parameters.
PadRight PadRight([number], 3, '0') Expects exactly 3 parameters.
Pow Pow(3, 2) Expects exactly 2 parameters.
Random Random() Expects no parameters.
Round Round(4.5234, 2) Expects exactly 2 parameters.
Sign Sign(-10) Expects exactly 1 parameter.
Sin Sin(0) Expects exactly 1 parameter.
Sqrt Sqrt(4) Expects exactly 1 parameter.
StartsWith StartsWith('start') Expects exactly 1 parameter.
Sum Sum(0, 2, 3, 4) Expects at least 1 parameter.
Tan Tan(0) Expects exactly 1 parameter.
Truncate Truncate(1.7) Expects exactly 1 parameter.
Clone this wiki locally