second
function
Applies to: Databricks SQL Databricks Runtime
Returns the second component of the timestamp in expr
.
Syntax
second(expr)
Arguments
expr
: ATIMESTAMP
expression.
Returns
An INTEGER
.
This function is equivalent to int(extract(SECOND FROM timestamp))
.
Examples
> SELECT second('2009-07-30 12:58:59');
59