SECONDS_BETWEEN
Purpose
This function returns the number of seconds between two timestamps.
Syntax
seconds_between::=
Usage Notes
- If a timestamp
timestamp1
is earlier than timestamptimestamp2
, then the result is negative. - Additionally, the result contains the difference in milliseconds.
- For data type
TIMESTAMP WITH LOCAL TIME ZONE
this function is calculated internally within UTC.