This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
MID
|
MID ( value , startFrom {, numChars} ) | ||||||||
Parameter | Type | Description | ||||||
value | Text, CellRef, Expression |
![]() |
Text containing the characters to extract | |||||
startFrom | Number |
![]() |
Number designating the first character to extract in text | |||||
numChars | Number |
![]() |
Number of characters to return | |||||
The MID function returns the requested number of characters from value starting at the position specified in startFrom. It accepts text data for value and numeric data for startFrom and numChars. It returns text data.
In value, pass the text string containing the characters you want to extract. It can be a string, a formula that returns a string, or a reference to a cell containing a string.
In startFrom, pass a number representing the first character you want to extract in text, with the first character in the text having a value of one (1); if not an integer, the number is truncated. It can be a string, a formula that returns a string, or a reference to a cell containing a string. If startFrom:
In numChars, pass the number of characters to return from value; if an integer is not specified, the number is truncated.
MID(B17,5,8)
MID("hello world",7,20) //"world"
Product: 4D
Theme: 4D View Pro Formulas
4D View Pro Reference ( 4D v19)