You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


timeBetween

Returns the interval between two given times.

Example

In the example, the function returns 300,000 milliseconds, which is 5 minutes.

timeBetween(timestamp("2001-12-24 23:05:00.000"),
              timestamp("2001-12-24 23:00:00.000"))

Syntax

timeBetween(timestamp endTime, timestamp startTime)
  • endTime: end of the interval as a timestamp
  • startTime: start of the interval as a timestamp

Returns

long

Notes

timeBetween takes the end time (endTime) and start time (startTime), and returns the duration between the two given timestamps in milliseconds.


© Incorta, Inc. All Rights Reserved.