timeinterval(
STARTTIME
,
ENDTIME
)

The timeinterval( function calculates the time interval between two times. It works correctly even if the interval between the two times crosses over midnight.


Parameters

This function has two parameters:

starttime – is a number (number of seconds) representing the starting point of the time interval.

endtime – is a number (number of seconds) representing the ending point of the time interval.


Description

The timeinterval( function calculates the time interval between two times. It works correctly even if the interval between the two times crosses over midnight. This function returns a time interval between 0 and 24 hours. See also the timedifference( function, which returns a time interval between –12 and +12 hours.

If the end time is later in the same day as the start time, the result of the function is the same as subtracting the start time from the end time:

timepattern(timeinterval(time("205a"), time("930p")),"hh:mm") ☞ 19:25

If the end time is in the next day, the function adjusts for the fact that the interval crosses over midnight:

timepattern(timeinterval(time("930p"), time("205a")),"hh:mm") ☞ 4:35       

Note: The timeinterval( function assumes that the interval is no more than 24 hours. If you need to compute intervals that cross over multiple days you must use SuperDates, which combine both date and time into a single value.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0