Previous Topic: MAYBE Function--Report an Indeterminate Result

Next Topic: MIN Function--Determine the Lesser of Two Numbers

MID Function--Return Part of a String

The MID function returns the characters of the source_string starting at the start position (numbered from one) up to the specified length. If no length is specified, the rest of the source_string (after the start position) is returned.

Syntax

The MID function has the following format:

MID(source_string, start[,length])

Parameters

The MID function accepts the following parameters:

source_string (string)

start (number)

length (number) (Optional)

Return Value

The MID function returns a string.

Example

Return_value=MID('JuanJuan', 2, 3)
Return_value='uan'

Return_value=MID('JuanJuan', 2)
Return_value='uanJuan'

More information:

LEFT Function--Return Part of a String

RIGHT Function--Retrieve Characters from a String


Copyright © 2010 CA. All rights reserved. Email CA about this topic