Function reference
Obtains a specified number of characters from a specified position in a string.

Mid ( string, start {, length } )


Argument Description
string The string from which you want characters returned.
start A long specifying the position of the first character you want returned (the position of the first character of the string is 1).
length (optional) A long whose value is the number of characters you want returned. If you do not enter length or if length is greater than the number of characters to the right of start, Mid returns the remaining characters in the string.

Data type: String
Returns characters specified in length of string starting at character start. If start is greater than the number of characters in string, the Mid function returns the empty string (“”). If length is greater than the number of characters remaining after the start character, Mid returns the remaining characters. The return string is not filled with spaces to make it the specified length.

Example 1
This expression returns E RUTH
Mid(‘BABE RUTH’, 4)

Example 2
This expression returns RU
Mid(‘BABE RUTH’, 6 , 2)

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment