Functions 

BTC's expression evaluator supports a number of functions that allow advanced data manipulation in addition to the standard operators.
 

String manipulation functions

string LEFT( string, length )

string The string to be sliced
length The number of characters to be sliced 
returns The left length characters of string. If string has fewer than length characters then the whole string is returned

string MID( string, offset [, length] )

string The string to be sliced
offset The offset from the start of string to take characters from
length The optional length value restricts the length of the returned string. If not specified, all the characters from offset onwards are returned

string RIGHT( string, length )

string The string to be sliced.
length The number of characters to be sliced.
returns The rightmost length characters of string. If string has fewer than length characters then the whole string is returned.

string LTRIM( string )

string The string to be trimmed.
returns string with all whitespace characters removed from the left.

string RTRIM( string )

string The string to be trimmed.
returns string with all whitespace characters removed from the right.

string CHOP( string, length )

string The string to be sliced.
length The number of characters to be chopped
returns string with length characters removed from the end. If there are fewer than length characters in string then an empty string is returned.

integer LEN( string )

string The string who's length is to be measured
returns The number of characters in string.

integer POS( string, substring )

string The string to be searched.
substring The string that is looked for in string.
returns If substring can be found in string then the offset of the occurance of substring is returned, otherwise -1 is returned. 

string UCASE( string )

string The string to be converted.
returns string with all alphabetic characters converted to upper case.

Mathematical functions

integer ROUND( number )

number The number to be rounded.
returns The integer value that is closest to the supplied number.

number ABS( number )

number The number who's absolute value is to be found.
returns The absolute value of number. The absolute value of a number is the number with any negative sign removed.

number SQRT( number )

number The number who's square root is to be found. This must be a positive number.
returns The square root of number.

number SUM( string )

string Regular expression that specifies the set of field names to be totaled. EG SUM("Amount*") will add up all fields who's name starts with "Amount". 
returns Total of fields matching supplied regular expression.

Conversion functions

string STR( value )

 
value A value of any type
returns A string containing the characters that would be used to display the supplied value

number VAL( string )

string A string that represents a numeric value or another expression.
returns The numeric value that is represented by string.

Date functions

date TODAY()

returns Today's date