Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2018)

Mid

  • Last UpdatedOct 04, 2024
  • 1 minute read

Return a sub-string within a string.

Syntax

Mid(s1, start [,len])

Arguments

  • s1

    string

  • start

    An integer specifying the position of the first character within the string. The first character in the string is number 1

    len

    Optional: The maximum length of the returned string. The default is the length of the string

Returns

len characters of the string to the right of (and including) the first character whose position is specified by start

Exceptions

If the arguments are not of the required types, an error value is returned. The maximum number of characters that can be returned is 999

Example

  • Mid("String", 3)

    [Returns "ring"]

  • Mid("String", 3, 2)

    [Returns "ri"]

In This Topic
TitleResults for “How to create a CRG?”Also Available in