SUBSTRING function

Synopsis
This function retrieves a substring from a string.
Variations
SUBSTRING(String, Index)
Returns a substring of the specified string. The substring starts at a specified index and continues until the end of the string.
Parameters
String

Specifies the string from which to retrieve the substring.

Supported types: String.
Index

Specifies the index of the starting character. The first character in the string has index "1".

Supported types: Numeric.
Returns
Returned types: String.
Examples
1.

The following example returns "Assistant"

SUBSTRING("Matrox Design Assistant", 15)
SUBSTRING(String, Index, Length)
Returns a substring of the specified string. The substring starts at a specified index and continues for a specified number of characters.
Parameters
String

Specifies the string from which to retrieve the substring.

Supported types: String.
Index

Specifies the index of the starting character. The first character in the string has index "1".

Supported types: Numeric.
Length

Specifies the length of the substring extracted from String. The substring starts at at the specified Index.

Supported types: Numeric.
Returns
Returned types: String.
Examples
1.

The following example returns "Matrox"

SUBSTRING("Matrox Design Assistant", 1, 6)