DATE AND TIME Functions

All functions > DATE AND TIME

All functions in the DATE AND TIME category.

Date/timestamp arithmetic

FunctionDescription
ADD() Returns the date/timestamp after adding an interval.
DATE_ADD() Returns the date/timestamp after adding a given number of a given units to the given date or...
SUBTRACT() Subtracts an interval from a timestamp or date, or returns the interval between two timestamps or...
DATE_SUBTRACT() Returns timestamp1 minus timestamp2 in the given unit. Chaining-friendly: the base value comes...
DATE_DIFF() Returns the difference between start and end in the given unit (end − start). Matches the...

Calendar queries

FunctionDescription
FIRST_DAY_OF() Returns the first calendar day of the period containing the given date or timestamp, as midnight on...
LAST_DAY_OF() Returns the last calendar day of the period containing the given date or timestamp, as midnight on...
DAYS_IN() Returns the number of calendar days in the MONTH, QUARTER, HALF (half-year), or YEAR that contains...

Sequence generation

FunctionDescription
SEQUENCE() Generates an inclusive array of dates or timestamps separated by an interval.
DATE_SEQUENCE() Returns an array of timestamps: count values beginning at start, each separated by interval.

Extraction

FunctionDescription
DATE_PART() Returns the part of the given timestamp in the given unit.

Truncation and formatting

FunctionDescription
DATE_TRUNC() Returns the given date or timestamp truncated to the given unit.
DATE_FORMAT() Returns a string from the given date or timestamp and format.
TO_ISO8601() Returns an ISO 8601 string from the given timestamp or interval.

Parsing and construction

FunctionDescription
DATE_PARSE() Returns a timestamp from the given string and format.
FROM_ISO8601_TIMESTAMP() Returns a timestamp from the given ISO 8601 string.
MAKE_DATE() Builds a DATE from a ROW of calendar components.
MAKE_TIMESTAMP() Builds a TIMESTAMP from a ROW of calendar and clock components.

Unix time conversion

FunctionDescription
FROM_UNIXTIME() Returns a timestamp from the given unix timestamp (BIGINT representation of the number of seconds...
TO_UNIXTIME() Returns a unix timestamp (BIGINT representation of the number of seconds since 1970-01-01 00:00:00...

Timezone conversion

FunctionDescription
LOCAL_TO_UTC() Treats a naive TIMESTAMP as local wall time in the given zone and returns the same instant as a...
UTC_TO_LOCAL() Interprets a naive UTC TIMESTAMP as an instant and returns it in the given timezone (TIMESTAMPTZ).

Interval operations

FunctionDescription
MAKE_INTERVAL() Builds an INTERVAL from a ROW of duration components.
FROM_ISO8601_INTERVAL() Returns an interval from the given ISO 8601 duration string.
INTERVAL_PARSE() Returns an interval from the given duration string.
INTERVAL_TO_MS() Returns the truncated number of milliseconds in the given interval.
TO_ISO8601() Returns an ISO 8601 duration string from the given interval.
MULTIPLY() Scales an interval by an integer factor.

Summary

  • Functions in DATE AND TIME: 28

This documentation is automatically generated from the FeatureMesh registry.

Last update at: 2026/05/26 17:22:09