DATE AND TIME Functions
All functions > DATE AND TIME
All functions in the DATE AND TIME category.
Date/timestamp arithmetic
| Function | Description |
|---|
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
| Function | Description |
|---|
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
| Function | Description |
|---|
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
| Function | Description |
|---|
DATE_PART() | Returns the part of the given timestamp in the given unit. |
Truncation and formatting
| Function | Description |
|---|
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
Unix time conversion
| Function | Description |
|---|
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
| Function | Description |
|---|
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
Summary
- Functions in DATE AND TIME: 28
This documentation is automatically generated from the FeatureMesh registry.