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 LTS 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.
Important
This feature is in Beta.
Returns the current time at the start of query evaluation. The value does not change during the query.
This function is a synonym for current_time.
Syntax
localtime( [ precision ] )
Arguments
precision: An optionalINTEGERliteral from0through9that specifies the number of fractional-second digits. The default is6.
Returns
A TIME.
The parentheses are optional when you omit precision.
Examples
> SELECT localtime();
16:57:04.304361
> SELECT localtime(3);
16:57:04.304