SQL time and date functions

The InfluxDB Cloud Serverless SQL implementation supports time and date functions that are useful when working with time series data.

current_date

Returns the current UTC date.

current_date returns a DATE32 Arrow type, which isn’t supported by InfluxDB. To use with InfluxDB, cast the return value to a timestamp or string.

The current_date() return value is determined at query time and returns the same date, no matter when in the query plan the function executes.

current_date()

View current_date query example

current_time

Returns the current UTC time.

The current_time() return value is determined at query time and returns the same time, no matter when in the query plan the function executes.

current_time()

View current_time query example