From 434708d05ba610a23d28fb45504b9cff72860f22 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 27 Mar 2023 16:19:36 -0600 Subject: [PATCH] updated units supported by INTERVAL (#4832) --- .../cloud-iox/reference/sql/_index.md | 14 +++++++++++++ .../cloud-iox/reference/sql/data-types.md | 15 +++++++++----- .../reference/sql/functions/time-and-date.md | 20 ++++++++++--------- 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/content/influxdb/cloud-iox/reference/sql/_index.md b/content/influxdb/cloud-iox/reference/sql/_index.md index 5ad37b49e..87644c252 100644 --- a/content/influxdb/cloud-iox/reference/sql/_index.md +++ b/content/influxdb/cloud-iox/reference/sql/_index.md @@ -118,6 +118,20 @@ INTERVAL '4 minutes' INTERVAL '12 days 6 hours 30 minutes' ``` +The following units of time are supported: + +- nanoseconds +- microseconds +- milliseconds +- seconds +- minutes +- hours +- days +- weeks +- months +- years +- century + ## Operators Operators are reserved words or characters which perform certain operations, inluding comparisons and arithmetic. diff --git a/content/influxdb/cloud-iox/reference/sql/data-types.md b/content/influxdb/cloud-iox/reference/sql/data-types.md index 48747e209..3968dd97d 100644 --- a/content/influxdb/cloud-iox/reference/sql/data-types.md +++ b/content/influxdb/cloud-iox/reference/sql/data-types.md @@ -155,12 +155,17 @@ YYYY-MM-DD 00:00:00 The INTERVAL data type can be used with the following precision: -- year -- month -- day -- hour -- minute +- nanosecond +- microsecond +- millisecond - second +- minute +- hour +- day +- week +- month +- year +- century ##### Example interval literals ```sql diff --git a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md b/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md index fa693758c..2172dc8b6 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md +++ b/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md @@ -69,15 +69,17 @@ date_bin(interval, expression, origin-timestamp) The following intervals are supported: - - milliseconds - - seconds - - minutes - - hours - - days - - weeks - - months - - years - - century +- nanoseconds +- microseconds +- milliseconds +- seconds +- minutes +- hours +- days +- weeks +- months +- years +- century {{< expand-wrapper >}} {{% expand "View `date_bin` query example" %}}