FunctionsDate & Time
Date & Time
134 Date & Time functions in the NYXDB native function registry, with signatures, briefs, and measured medians where available.
134 functions in the date_time family. Each name links to its page; … marks the variadic argument list (the engine declares no named parameters). A Measured value appears only where a benchmark corpus case joins by name (server-class hardware, median).
| Function | Type | Description | Measured |
|---|---|---|---|
add_date(…) → Date | scalar | Add an interval to a date. | — |
age(…) → Int64 | scalar | Interval between timestamps. | — |
current_date(…) → Date | scalar | Current date. | — |
current_time(…) → String | scalar | Current time of day. | — |
current_timestamp(…) → Int64 | scalar | Current timestamp. | — |
date_add(…) → Int64 | scalar | Add an interval. | — |
date_as_blob(…) → Bytes | scalar | Encode date as binary. | — |
date_bin(…) → Int64 | scalar | Bin timestamps into fixed intervals. | — |
date_diff(…) → Int64 | scalar | Difference between two date/time values. | — |
date_diff_within(…) → Bool | scalar | Test whether two times are within a threshold. | — |
date_format(…) → String | scalar | Format a timestamp. | — |
date_larger(…) → Int64 | scalar | Choose the later of two date values. | — |
date_name(…) → String | scalar | Name of a date part. | — |
date_of(…) → Date | scalar | Date portion of a timestamp. | — |
date_part(…) → Int64 | scalar | Extract a field from a date/time value. | — |
date_smaller(…) → Int64 | scalar | Choose the earlier of two date values. | — |
date_sub(…) → Int64 | scalar | Subtract an interval. | — |
date_subtract(…) → Int64 | scalar | Subtract two dates/timestamps. | — |
date_time_to_snowflake(…) → String | scalar | Encode timestamp as Snowflake identifier. | — |
date_time_to_snowflake_id(…) → UInt64 | scalar | Encode timestamp as a Snowflake-style ID. | — |
date_time_to_uui_dv7(…) → UUID | scalar | Generate a UUIDv7 from a timestamp. | — |
date_time64_to_snowflake(…) → String | scalar | Encode timestamp as Snowflake identifier. | — |
date_time64_to_snowflake_id(…) → UInt64 | scalar | Encode timestamp as a Snowflake-style ID. | — |
date_trunc(…) → Int64 | scalar | Truncate to a time unit. | — |
extract(…) → Int64 | scalar | Extract a field from a date/time value. | — |
format_datetime(…) → String | scalar | Format a timestamp. | — |
format_datetime_in_joda_syntax(…) → String | scalar | Format a timestamp (Joda-style pattern). | — |
now(…) → Int64 | scalar | Current timestamp. | — |
now64(…) → DateTime64 | scalar | Current timestamp with sub-second precision. | — |
parse_date_time(…) → Int64 | scalar | Parse DateTime from text. | — |
parse_date_time_in_joda_syntax(…) → Int64 | scalar | Parse DateTime from text (pattern-based). | — |
parse_date_time_in_joda_syntax_or_null(…) → Int64 | scalar | Parse DateTime from text (pattern-based). | — |
parse_date_time_in_joda_syntax_or_zero(…) → Int64 | scalar | Parse DateTime from text (pattern-based). | — |
parse_date_time_or_null(…) → Int64 | scalar | Parse DateTime from text. | — |
parse_date_time_or_zero(…) → Int64 | scalar | Parse DateTime from text. | — |
parse_date_time64(…) → Int64 | scalar | Parse DateTime64 from text. | — |
parse_date_time64_in_joda_syntax(…) → Int64 | scalar | Parse DateTime64 from text (pattern-based). | — |
parse_date_time64_in_joda_syntax_or_null(…) → Int64 | scalar | Parse DateTime64 from text (pattern-based). | — |
parse_date_time64_in_joda_syntax_or_zero(…) → Int64 | scalar | Parse DateTime64 from text (pattern-based). | — |
parse_date_time64_or_null(…) → Int64 | scalar | Parse DateTime64 from text. | — |
parse_date_time64_or_zero(…) → Int64 | scalar | Parse DateTime64 from text. | — |
parse_datetime(…) → Int64 | scalar | Parse DateTime from text. | — |
parse_datetime_best_effort(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_best_effort_or_null(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_best_effort_or_zero(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_best_effort_us(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_best_effort_us_or_null(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_best_effort_us_or_zero(…) → Int64 | scalar | Parse DateTime from text (best effort). | — |
parse_datetime_in_joda_syntax(…) → Int64 | scalar | Parse DateTime from text (pattern-based). | — |
parse_datetime32_best_effort(…) → Int64 | scalar | Parse DateTime32 from text (best effort). | — |
parse_datetime32_best_effort_or_null(…) → Int64 | scalar | Parse DateTime32 from text (best effort). | — |
parse_datetime32_best_effort_or_zero(…) → Int64 | scalar | Parse DateTime32 from text (best effort). | — |
parse_datetime64_best_effort(…) → Int64 | scalar | Parse DateTime64 from text (best effort). | — |
parse_datetime64_best_effort_or_null(…) → Int64 | scalar | Parse DateTime64 from text (best effort). | — |
parse_datetime64_best_effort_or_zero(…) → Int64 | scalar | Parse DateTime64 from text (best effort). | — |
parse_datetime64_best_effort_us(…) → Int64 | scalar | Parse DateTime64 from text (best effort). | — |
parse_datetime64_best_effort_us_or_null(…) → Int64 | scalar | Parse DateTime64 from text (best effort). | — |
sub_date(…) → Date | scalar | Subtract an interval from a date. | — |
time_as_blob(…) → Bytes | scalar | Encode time as binary. | — |
time_bucket(…) → Int64 | scalar | Bin timestamps into fixed intervals. | — |
time_diff(…) → Int64 | scalar | Difference between two date/time values. | — |
time_hash(…) → Int64 | scalar | Hash a time value. | — |
time_hash_extended(…) → Int64 | scalar | Hash a time value (extended). | — |
time_larger(…) → Int64 | scalar | Choose the later of two time values. | — |
time_smaller(…) → Int64 | scalar | Choose the earlier of two time values. | — |
time_zone(…) → String | scalar | Session time zone. | — |
time_zone_of(…) → String | scalar | Time zone of a timestamp. | — |
time_zone_offset(…) → Int64 | scalar | Time zone offset. | — |
timestamp_as_blob(…) → Bytes | scalar | Encode timestamp as binary. | — |
timestamp_diff(…) → Int64 | scalar | Difference between two date/time values. | — |
timestamp_hash(…) → Int64 | scalar | Hash a timestamp value. | — |
timestamp_hash_extended(…) → Int64 | scalar | Hash a timestamp value (extended). | — |
timestamp_larger(…) → Int64 | scalar | Choose the later of two timestamp values. | — |
timestamp_smaller(…) → Int64 | scalar | Choose the earlier of two timestamp values. | — |
timezone(…) → String | scalar | Session time zone. | — |
timezone_of(…) → String | scalar | Time zone of a timestamp. | — |
timezone_offset(…) → Int64 | scalar | Time zone offset. | — |
to_date(…) → Date | scalar | Convert to date. | — |
to_datetime(…) → DateTime | scalar | Convert to timestamp. | — |
to_datetime64(…) → DateTime64 | scalar | Convert to high-precision timestamp. | — |
to_day_of_month(…) → Int64 | scalar | Extract day of month. | — |
to_day_of_week(…) → Int64 | scalar | Extract day of week. | — |
to_day_of_year(…) → Int64 | scalar | Extract day of year. | — |
to_hour(…) → Int64 | scalar | Extract hour. | — |
to_iso_week(…) → Int64 | scalar | Extract iso week. | — |
to_iso_year(…) → Int64 | scalar | Extract iso year. | — |
to_minute(…) → Int64 | scalar | Extract minute. | — |
to_month(…) → Int64 | scalar | Extract month. | — |
to_quarter(…) → Int64 | scalar | Extract quarter. | — |
to_relative_day_num(…) → Int64 | scalar | Relative day number. | — |
to_relative_hour_num(…) → Int64 | scalar | Relative hour number. | — |
to_relative_minute_num(…) → Int64 | scalar | Relative minute number. | — |
to_relative_month_num(…) → Int64 | scalar | Relative month number. | — |
to_relative_quarter_num(…) → Int64 | scalar | Relative quarter number. | — |
to_relative_second_num(…) → Int64 | scalar | Relative second number. | — |
to_relative_week_num(…) → Int64 | scalar | Relative week number. | — |
to_relative_year_num(…) → Int64 | scalar | Relative year number. | — |
to_second(…) → Int64 | scalar | Extract second. | — |
to_start_of_day(…) → DateTime | scalar | Truncate to start of day. | — |
to_start_of_fifteen_minutes(…) → DateTime | scalar | Truncate to start of fifteen minutes. | — |
to_start_of_five_minute(…) → DateTime | scalar | Truncate to start of five minute. | — |
to_start_of_five_minutes(…) → DateTime | scalar | Truncate to start of five minutes. | — |
to_start_of_hour(…) → DateTime | scalar | Truncate to start of hour. | — |
to_start_of_interval(…) → DateTime | scalar | Truncate to start of interval. | — |
to_start_of_iso_year(…) → DateTime | scalar | Truncate to start of iso year. | — |
to_start_of_microsecond(…) → DateTime64 | scalar | Truncate to start of microsecond. | — |
to_start_of_millisecond(…) → DateTime64 | scalar | Truncate to start of millisecond. | — |
to_start_of_minute(…) → DateTime | scalar | Truncate to start of minute. | — |
to_start_of_month(…) → DateTime | scalar | Truncate to start of month. | — |
to_start_of_nanosecond(…) → DateTime64 | scalar | Truncate to start of nanosecond. | — |
to_start_of_quarter(…) → DateTime | scalar | Truncate to start of quarter. | — |
to_start_of_second(…) → DateTime64 | scalar | Truncate to start of second. | — |
to_start_of_ten_minutes(…) → DateTime | scalar | Truncate to start of ten minutes. | — |
to_start_of_week(…) → DateTime | scalar | Truncate to start of week. | — |
to_start_of_year(…) → DateTime | scalar | Truncate to start of year. | — |
to_time(…) → Int64 | scalar | Convert to time. | — |
to_time_zone(…) → DateTime | scalar | Convert a timestamp to a time zone. | — |
to_timestamp(…) → Int64 | scalar | Convert to Unix timestamp. | — |
to_timezone(…) → DateTime | scalar | Convert a timestamp to a time zone. | — |
to_unix_timestamp(…) → Int64 | scalar | Convert timestamp to Unix epoch. | — |
to_unix_timestamp64_micro(…) → Int64 | scalar | Convert timestamp to Unix epoch. | — |
to_unix_timestamp64_milli(…) → Int64 | scalar | Convert timestamp to Unix epoch. | — |
to_unix_timestamp64_nano(…) → Int64 | scalar | Convert timestamp to Unix epoch. | — |
to_unix_timestamp64_second(…) → Int64 | scalar | Convert timestamp to Unix epoch. | — |
to_utc_timestamp(…) → DateTime | scalar | Convert a timestamp to UTC. | — |
to_week(…) → Int64 | scalar | Extract week. | — |
to_year(…) → Int64 | scalar | Extract year. | — |
to_year_week(…) → Int64 | scalar | ISO year-week key. | — |
to_yyyymm(…) → Int64 | scalar | Format as YYYYMM key. | — |
to_yyyymmd_dhhmmss(…) → Int64 | scalar | Format as YYYYMMD_DHHMMSS key. | — |
to_yyyymmdd(…) → Int64 | scalar | Format as YYYYMMDD key. | — |
to_yyyymmddhhmmss(…) → Int64 | scalar | Format as YYYYMMDDHHMMSS key. | — |
today(…) → Date | scalar | Current date. | — |
yesterday(…) → Date | scalar | Date for the previous day. | — |