LEFT – Returning First Character(s) of Required Numbers

  • Last update:  2023-07-25
  • Overview

    Grammar

    LEFT(text, num_chars)

    Returns the first or first several characters in the text, based on the number of characters you specify.

    Parameter 1

    text

    Text string or referenced cell from which you want to extract characters

    Parameter 2

    num_chars

    Number of characters you want to extract

    Notes

    • The value of num_chars must be equal to or greater than 0. If the value of num_chars is greater than the text length, the LEFT function returns all characters of the text. If num_chars is omitted, the default value 1 is returned.

    • The function supports two parameters. The first is of any type and the second is of the numeric type (that can be defaulted).

    Example

    For example, if you want to use the time-type field as a match basis to join two data tables, one of which records time fields in year-month-day format and the other records time fields in year-month-day-hour-minute-second format, the LEFT function can be used in this case to join them into the former format.

    Add a formula column, enter the formula LEFT(ingestTime,10), and set the field type to "Time", as shown in the following figure.

    LEFT.png

    The results are dates in year-month-day format as shown in the following figure.

    LEFT2.png

    More examples:

    FormulaResultNotes
    LEFT("Finesoftware",8)Finesoft-
    LEFT("Finesoftware")F-



    Attachment List


    Theme: Advanced Data Analyis
    前の記事
    次の記事
    • いいね
    • 良くない
    • 閲覧しただけ

    フィードバック

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    9s后关闭

    反馈已提交

    网络繁忙