DB
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).

FunctionTypeDescriptionMeasured
add_date(…) → DatescalarAdd an interval to a date.
age(…) → Int64scalarInterval between timestamps.
current_date(…) → DatescalarCurrent date.
current_time(…) → StringscalarCurrent time of day.
current_timestamp(…) → Int64scalarCurrent timestamp.
date_add(…) → Int64scalarAdd an interval.
date_as_blob(…) → BytesscalarEncode date as binary.
date_bin(…) → Int64scalarBin timestamps into fixed intervals.
date_diff(…) → Int64scalarDifference between two date/time values.
date_diff_within(…) → BoolscalarTest whether two times are within a threshold.
date_format(…) → StringscalarFormat a timestamp.
date_larger(…) → Int64scalarChoose the later of two date values.
date_name(…) → StringscalarName of a date part.
date_of(…) → DatescalarDate portion of a timestamp.
date_part(…) → Int64scalarExtract a field from a date/time value.
date_smaller(…) → Int64scalarChoose the earlier of two date values.
date_sub(…) → Int64scalarSubtract an interval.
date_subtract(…) → Int64scalarSubtract two dates/timestamps.
date_time_to_snowflake(…) → StringscalarEncode timestamp as Snowflake identifier.
date_time_to_snowflake_id(…) → UInt64scalarEncode timestamp as a Snowflake-style ID.
date_time_to_uui_dv7(…) → UUIDscalarGenerate a UUIDv7 from a timestamp.
date_time64_to_snowflake(…) → StringscalarEncode timestamp as Snowflake identifier.
date_time64_to_snowflake_id(…) → UInt64scalarEncode timestamp as a Snowflake-style ID.
date_trunc(…) → Int64scalarTruncate to a time unit.
extract(…) → Int64scalarExtract a field from a date/time value.
format_datetime(…) → StringscalarFormat a timestamp.
format_datetime_in_joda_syntax(…) → StringscalarFormat a timestamp (Joda-style pattern).
now(…) → Int64scalarCurrent timestamp.
now64(…) → DateTime64scalarCurrent timestamp with sub-second precision.
parse_date_time(…) → Int64scalarParse DateTime from text.
parse_date_time_in_joda_syntax(…) → Int64scalarParse DateTime from text (pattern-based).
parse_date_time_in_joda_syntax_or_null(…) → Int64scalarParse DateTime from text (pattern-based).
parse_date_time_in_joda_syntax_or_zero(…) → Int64scalarParse DateTime from text (pattern-based).
parse_date_time_or_null(…) → Int64scalarParse DateTime from text.
parse_date_time_or_zero(…) → Int64scalarParse DateTime from text.
parse_date_time64(…) → Int64scalarParse DateTime64 from text.
parse_date_time64_in_joda_syntax(…) → Int64scalarParse DateTime64 from text (pattern-based).
parse_date_time64_in_joda_syntax_or_null(…) → Int64scalarParse DateTime64 from text (pattern-based).
parse_date_time64_in_joda_syntax_or_zero(…) → Int64scalarParse DateTime64 from text (pattern-based).
parse_date_time64_or_null(…) → Int64scalarParse DateTime64 from text.
parse_date_time64_or_zero(…) → Int64scalarParse DateTime64 from text.
parse_datetime(…) → Int64scalarParse DateTime from text.
parse_datetime_best_effort(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_best_effort_or_null(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_best_effort_or_zero(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_best_effort_us(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_best_effort_us_or_null(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_best_effort_us_or_zero(…) → Int64scalarParse DateTime from text (best effort).
parse_datetime_in_joda_syntax(…) → Int64scalarParse DateTime from text (pattern-based).
parse_datetime32_best_effort(…) → Int64scalarParse DateTime32 from text (best effort).
parse_datetime32_best_effort_or_null(…) → Int64scalarParse DateTime32 from text (best effort).
parse_datetime32_best_effort_or_zero(…) → Int64scalarParse DateTime32 from text (best effort).
parse_datetime64_best_effort(…) → Int64scalarParse DateTime64 from text (best effort).
parse_datetime64_best_effort_or_null(…) → Int64scalarParse DateTime64 from text (best effort).
parse_datetime64_best_effort_or_zero(…) → Int64scalarParse DateTime64 from text (best effort).
parse_datetime64_best_effort_us(…) → Int64scalarParse DateTime64 from text (best effort).
parse_datetime64_best_effort_us_or_null(…) → Int64scalarParse DateTime64 from text (best effort).
sub_date(…) → DatescalarSubtract an interval from a date.
time_as_blob(…) → BytesscalarEncode time as binary.
time_bucket(…) → Int64scalarBin timestamps into fixed intervals.
time_diff(…) → Int64scalarDifference between two date/time values.
time_hash(…) → Int64scalarHash a time value.
time_hash_extended(…) → Int64scalarHash a time value (extended).
time_larger(…) → Int64scalarChoose the later of two time values.
time_smaller(…) → Int64scalarChoose the earlier of two time values.
time_zone(…) → StringscalarSession time zone.
time_zone_of(…) → StringscalarTime zone of a timestamp.
time_zone_offset(…) → Int64scalarTime zone offset.
timestamp_as_blob(…) → BytesscalarEncode timestamp as binary.
timestamp_diff(…) → Int64scalarDifference between two date/time values.
timestamp_hash(…) → Int64scalarHash a timestamp value.
timestamp_hash_extended(…) → Int64scalarHash a timestamp value (extended).
timestamp_larger(…) → Int64scalarChoose the later of two timestamp values.
timestamp_smaller(…) → Int64scalarChoose the earlier of two timestamp values.
timezone(…) → StringscalarSession time zone.
timezone_of(…) → StringscalarTime zone of a timestamp.
timezone_offset(…) → Int64scalarTime zone offset.
to_date(…) → DatescalarConvert to date.
to_datetime(…) → DateTimescalarConvert to timestamp.
to_datetime64(…) → DateTime64scalarConvert to high-precision timestamp.
to_day_of_month(…) → Int64scalarExtract day of month.
to_day_of_week(…) → Int64scalarExtract day of week.
to_day_of_year(…) → Int64scalarExtract day of year.
to_hour(…) → Int64scalarExtract hour.
to_iso_week(…) → Int64scalarExtract iso week.
to_iso_year(…) → Int64scalarExtract iso year.
to_minute(…) → Int64scalarExtract minute.
to_month(…) → Int64scalarExtract month.
to_quarter(…) → Int64scalarExtract quarter.
to_relative_day_num(…) → Int64scalarRelative day number.
to_relative_hour_num(…) → Int64scalarRelative hour number.
to_relative_minute_num(…) → Int64scalarRelative minute number.
to_relative_month_num(…) → Int64scalarRelative month number.
to_relative_quarter_num(…) → Int64scalarRelative quarter number.
to_relative_second_num(…) → Int64scalarRelative second number.
to_relative_week_num(…) → Int64scalarRelative week number.
to_relative_year_num(…) → Int64scalarRelative year number.
to_second(…) → Int64scalarExtract second.
to_start_of_day(…) → DateTimescalarTruncate to start of day.
to_start_of_fifteen_minutes(…) → DateTimescalarTruncate to start of fifteen minutes.
to_start_of_five_minute(…) → DateTimescalarTruncate to start of five minute.
to_start_of_five_minutes(…) → DateTimescalarTruncate to start of five minutes.
to_start_of_hour(…) → DateTimescalarTruncate to start of hour.
to_start_of_interval(…) → DateTimescalarTruncate to start of interval.
to_start_of_iso_year(…) → DateTimescalarTruncate to start of iso year.
to_start_of_microsecond(…) → DateTime64scalarTruncate to start of microsecond.
to_start_of_millisecond(…) → DateTime64scalarTruncate to start of millisecond.
to_start_of_minute(…) → DateTimescalarTruncate to start of minute.
to_start_of_month(…) → DateTimescalarTruncate to start of month.
to_start_of_nanosecond(…) → DateTime64scalarTruncate to start of nanosecond.
to_start_of_quarter(…) → DateTimescalarTruncate to start of quarter.
to_start_of_second(…) → DateTime64scalarTruncate to start of second.
to_start_of_ten_minutes(…) → DateTimescalarTruncate to start of ten minutes.
to_start_of_week(…) → DateTimescalarTruncate to start of week.
to_start_of_year(…) → DateTimescalarTruncate to start of year.
to_time(…) → Int64scalarConvert to time.
to_time_zone(…) → DateTimescalarConvert a timestamp to a time zone.
to_timestamp(…) → Int64scalarConvert to Unix timestamp.
to_timezone(…) → DateTimescalarConvert a timestamp to a time zone.
to_unix_timestamp(…) → Int64scalarConvert timestamp to Unix epoch.
to_unix_timestamp64_micro(…) → Int64scalarConvert timestamp to Unix epoch.
to_unix_timestamp64_milli(…) → Int64scalarConvert timestamp to Unix epoch.
to_unix_timestamp64_nano(…) → Int64scalarConvert timestamp to Unix epoch.
to_unix_timestamp64_second(…) → Int64scalarConvert timestamp to Unix epoch.
to_utc_timestamp(…) → DateTimescalarConvert a timestamp to UTC.
to_week(…) → Int64scalarExtract week.
to_year(…) → Int64scalarExtract year.
to_year_week(…) → Int64scalarISO year-week key.
to_yyyymm(…) → Int64scalarFormat as YYYYMM key.
to_yyyymmd_dhhmmss(…) → Int64scalarFormat as YYYYMMD_DHHMMSS key.
to_yyyymmdd(…) → Int64scalarFormat as YYYYMMDD key.
to_yyyymmddhhmmss(…) → Int64scalarFormat as YYYYMMDDHHMMSS key.
today(…) → DatescalarCurrent date.
yesterday(…) → DatescalarDate for the previous day.