Description
The Mid function returns a specified number of characters from a string.
Arguments
str is the text string from which one or more characters is being extracted.
start is a whole number indicating the position of the first character to extract.
length is a whole number indicating the number of characters to be extracted from the text string. This argument is optional. If a value is not specified, the rest of the string from the starting position is extracted.
Action
The Mid function returns a specified number of characters from a string. The second argument is the character position where the part to be taken begins. The third argument is the length of the string you want to be taken out. If the third argument is not specified, everything from the start position to the end of the string is extracted.
Typical uses
Use this function anytime you need to extract a set of characters from somewhere in the middle of a text string.
Examples
Mid("abcdef", 3, 2)
Returns "cd".