MID
Syntax
MID (string_expression, start_position, number)
Description
Returns the characters in the string beginning from start_position.
Arguments
string_expression | A string expression. |
start_position | The position to start returning data. start_position must be a positive integer. |
number | The number of characters to return. |
Returns
A string containing the specified number of characters in a string beginning from start_position.
- If start_position is greater than the total number of characters in the string, returns the empty string.
- If the requested number of characters goes beyond the end of the string, returns all characters beginning with start_position.
Example
If MyEntity.VehicleInfo contains the value "Car:Honda LicensePlate:123-4567 Year:1993":
MID(MyEntity.VehicleInfo, FIND(MyEntity.VehicleInfo, "LicensePlate")+14, 8)
Returns: 123-4567, that is, the license plate number, which starts at position 21.