MID ER function

The MID function returns a String value that presents the specified number of characters from the specified string, starting at the specified position.

Syntax

MID (text, starting position, number of characters)

Arguments

text: String

A String value that specifies the text to return characters from.

starting position: Integer

An Integer value that specifies the position of the first character that must be returned from the specified text.

number of characters: Integer

An Integer value that specifies the number of characters that must be returned, starting at the specified starting position.

Return values

String

The resulting text value.

Usage notes

If the value of the starting position argument is less than 0 (zero), the characters that are returned are counted from the first position in the specified string.

If the value of the starting position argument exceeds length of the specified string, an empty string is returned.

Example

MID ("Sample", 2, 3) returns "amp".

Additional resources

Text functions