Skip to main content

MID function

The MID/MIDB function is one of the text and data functions. Is used to extract the characters from the specified string starting from any position. The MID function is intended for languages that use the single-byte character set (SBCS), while MIDB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

Syntax​

MID(text, start_num, num_chars)

The MID function has the following arguments:

ArgumentDescription
textA string you need to extract the characters from.
start_numA position you need to start extracting from.
num_charsA number of the characters you need to extract.

MIDB(text, start_num, num_bytes)

The MIDB function has the following arguments:

ArgumentDescription
textA string you need to extract the characters from.
start_numA position you need to start extracting from.
num_bytesA number of the characters you need to extract, based on bytes.

Notes​

How to apply the MID/MIDB function.

Examples​

The figure below displays the result returned by the MID function.

MID Function