Skip to content

functions_datetime.yaml

This document file is generated for functions_datetime.yaml

Scalar Functions

extract

Implementations:
extract(req_enum:The part of the value to extract., x): -> return_type
0. extract(req_enum:The part of the value to extract., timestamp): -> i64
1. extract(req_enum:The part of the value to extract., timestamp_tz): -> i64
2. extract(req_enum:The part of the value to extract., date): -> i64
3. extract(req_enum:The part of the value to extract., time): -> i64

Extract portion of a date/time value.

Options:
  • The part of the value to extract. ['YEAR', 'MONTH', 'DAY', 'SECOND']
  • The part of the value to extract. ['YEAR', 'MONTH', 'DAY']
  • The part of the value to extract. ['SECOND']
  • add

    Implementations:
    add(x, y): -> return_type
    0. add(timestamp, interval_year): -> timestamp
    1. add(timestamp_tz, interval_year): -> timestamp
    2. add(date, interval_year): -> timestamp
    3. add(timestamp, interval_day): -> timestamp
    4. add(timestamp_tz, interval_day): -> timestamp
    5. add(date, interval_day): -> timestamp

    Add an interval to a date/time type.

    add_intervals

    Implementations:
    add_intervals(x, y): -> return_type
    0. add_intervals(interval_day, interval_day): -> interval_day
    1. add_intervals(interval_year, interval_year): -> interval_year

    Add two intervals together.

    subtract

    Implementations:
    subtract(x, y): -> return_type
    0. subtract(timestamp, interval_year): -> timestamp
    1. subtract(timestamp_tz, interval_year): -> timestamp_tz
    2. subtract(date, interval_year): -> date
    3. subtract(timestamp, interval_day): -> timestamp
    4. subtract(timestamp_tz, interval_day): -> timestamp_tz
    5. subtract(date, interval_day): -> date

    Subtract an interval from a date/time type.

    lte

    Implementations:
    lte(x, y): -> return_type
    0. lte(timestamp, timestamp): -> boolean
    1. lte(timestamp_tz, timestamp_tz): -> boolean
    2. lte(date, date): -> boolean
    3. lte(interval_day, interval_day): -> boolean
    4. lte(interval_year, interval_year): -> boolean

    less than or equal to

    lt

    Implementations:
    lt(x, y): -> return_type
    0. lt(timestamp, timestamp): -> boolean
    1. lt(timestamp_tz, timestamp_tz): -> boolean
    2. lt(date, date): -> boolean
    3. lt(interval_day, interval_day): -> boolean
    4. lt(interval_year, interval_year): -> boolean

    less than

    gte

    Implementations:
    gte(x, y): -> return_type
    0. gte(timestamp, timestamp): -> boolean
    1. gte(timestamp_tz, timestamp_tz): -> boolean
    2. gte(date, date): -> boolean
    3. gte(interval_day, interval_day): -> boolean
    4. gte(interval_year, interval_year): -> boolean

    greater than or equal to

    gt

    Implementations:
    gt(x, y): -> return_type
    0. gt(timestamp, timestamp): -> boolean
    1. gt(timestamp_tz, timestamp_tz): -> boolean
    2. gt(date, date): -> boolean
    3. gt(interval_day, interval_day): -> boolean
    4. gt(interval_year, interval_year): -> boolean

    greater than