SUBSTRING

Extracts a portion of a text string starting from a specified position with a given length

Updated over a week ago

Description

The SUBSTRING() function is used to extract a substring from a text string, starting from a specified character position and of a specified length. This function is useful for text manipulation and data extraction.

Syntax

SUBSTRING(text, start, [length])

Output

text

Variables

  1. text: The input text string from which you want to extract a substring.

  2. start: The starting position within the text string. The start position begins at 1.

  3. length: (Optional) The length of the substring to be extracted.

Example

SUBSTRING(`Product Code`,4)

ID

Product Code

SUBSTRING

1

ELE12345

12,345

2

CLO67890

67,890

3

FOO45678

45,678

Did this answer your question?