date_diff(unit, timestamp1, timestamp2) → bigint
Returns timestamp2 - timestamp1 expressed in terms of unit.
> select date_diff('day',from_unixtime(1610180252),from_unixtime(1611217052));
_col0
-------
12
2024-03-25 22:05:46
date_diff(unit, timestamp1, timestamp2) → bigint
Returns timestamp2 - timestamp1 expressed in terms of unit.
> select date_diff('day',from_unixtime(1610180252),from_unixtime(1611217052));
_col0
-------
12