time24(
TIME
)

The time24( function takes a time and makes sure it falls within a 24 hour period.


Parameters

This function has one parameter:

time – is a time (number of seconds) that may be greater than 23 hours, 59 minutes, 59 seconds, and may also be less than zero.


Description

The time24( function takes a time and makes sure it falls within a 24 hour period. If the time is less than 24 hours, it is unchanged. If the time is greater than 24 hours, it is converted to the equivalent time in a 24 hour period (for example 30:00:00 is converted to 6:00:00).

The time24( function can help with calculations of an ending time from a start time and duration. The basic formula for such a calculation is shown here.

EndTime=StartTime+Duration

This formula works fine unless the interval extends over midnight. The time24( function adjusts the result to make sure it starts over at zero as it crosses midnight.

EndTime=time24(StartTime+Duration)

This formula will correctly calculate that 10:30 PM + 4 hours is 2:30 AM.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0