The TSDIFF function calculates the difference in milliseconds between two TIMESTAMP expressions. See Expressions and Literals.
BIGINT TSDIFF(startTime, endTime)
Returns NULL if any of the arguments is null.
Otherwise returns the difference between the two timestamps in milliseconds.
values TSDIFF (timestamp'2022-04-03 12:52:26.614', timestamp'2022-04-02 12:52:26.614');
'EXPR$0'
'86400000'