localtimestamp function
Applies to: Databricks SQL
Databricks Runtime
Returns the current timestamp without a time zone at the start of query evaluation. The value does not change during the query.
Beta
The precision argument is available only in Databricks Runtime 19 and above. Values 7 through 9 are in Beta. For nanosecond-precision support, see TIMESTAMP_NTZ type.
Syntax
localtimestamp( [ precision ] )
Arguments
precision: An optionalINTEGERliteral. Valid values are6,7,8, and9. The default is6.
Returns
A TIMESTAMP_NTZ with the specified precision.
The parentheses are optional when you omit precision.
Examples
SQL
> SELECT localtimestamp();
2026-10-29 16:57:04.304361
> SELECT localtimestamp(9);
2026-10-29 16:57:04.304361123