Skip to main content Skip to complementary content

Mid - script and chart function

Mid() returns the part of the input string starting at the position of the character defined by the second argument, 'start', and returning the number of characters defined by the third argument, 'count'. If 'count' is omitted, the rest of the input string is returned. The first character in the input string is numbered 1.

Syntax:  

Mid(text, start[, count])

Return data type: string

Arguments:  

Mid arguments
Argument Description
text The original string.
start Integer defining the position of the first character in text to include.
count Defines the string length of the output string. If omitted, all characters from the position defined by start are included.

Examples and results:  

Examples and results
Example Result
Mid('abcdef',3 ) Returns 'cdef'
Mid('abcdef',3, 2 ) Returns 'cd'

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com