Functions Language

SubStr

The SubStr() function returns part of a string.

Note:

SubStr() is an old function that is interchangeable with the Excel Mid() function. Mid() should be used in place of SubStr(). Note that while SubStr is zero based (the character count starts from 0), Mid() is not zero based (the character count starts from 1).

Syntax


Substr (Text, Start, Length)

Text The input text
Start The starting point of the required part of the string (this is zero based, i.e. the first position is zero)
Length The number of characters to return

Examples


Function Output
Substr(“ABCDEFG”, 3, 2) “DE”
Substr(“ABCD EFG”, 2, 4) “CD E”
Substr(“ABCDEFG”, 10, 4) “”
Substr(“123456789”, 0, 3) “123”