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
- current_time
- current_timestamp
- date_bin
- date_bin_gapfill
- date_bin_wallclock
- date_bin_wallclock_gapfill
- date_trunc
- datetrunc
- date_format
- date_part
- datepart
- extract
- from_unixtime
- make_date
- now
- today
- to_char
- to_date
- to_local_time
- to_timestamp
- to_timestamp_micros
- to_timestamp_millis
- to_timestamp_nanos
- to_timestamp_seconds
- to_unixtime
- tz
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()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()