Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Databricks SQL
Databricks Runtime 18 and above
Note
Databricks Runtime 18 is newer than Databricks Runtime 18.0, 18.1, and 18.2. Features that would previously have shipped as a later numbered version now ship as dated updates to Databricks Runtime 18 instead. For details, see About unified release notes.
Returns the current time at the start of query evaluation. All calls of current_time within the same query return the same value.
Syntax
current_time( [ precision ] )
Arguments
precision: An optional INTEGER literal in the range0to6, indicating how many fractional digits of seconds to include. The default is6.
Returns
A TIME.
The parentheses are optional when no precision argument is given.
Examples
> SELECT current_time();
16:57:04.304361
> SELECT current_time;
16:57:04.304361
> SELECT current_time(0);
16:57:04
> SELECT current_time(3);
16:57:04.304