TSDIFF

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Time Functions >

TSDIFF

Previous pageReturn to chapter overviewNext page

The TSDIFF function calculates the difference in milliseconds between two TIMESTAMP expressions. See Expressions and Literals.

5_2_indicator

Version 5.2 Feature

This feature is new in s-Server 5.2.

Syntax

BIGINT TSDIFF(startTime, endTime)

 

Returns NULL if any of the arguments is null.

Otherwise returns the difference between the two timestamps in milliseconds.

Example

values TSDIFF (timestamp'2022-04-03 12:52:26.614', timestamp'2022-04-02 12:52:26.614');

'EXPR$0'

'86400000'