Built-In Function - 5

427 Views


Time Details

The *TIME DETAILS built-in function returns information about a given time. You specify the type of information you need using the *Time Detail parameter.

There are three parameters for this function type:

· Two input parameters

° *Time is the time for which information is to be returned. If it is of type NBR, it is interpreted as the elapsed time since 0 am.

° *Time detail type determines the meaning of the output parameter, *Time detail.

· One output parameter, *Time detail, returns the requested information for the specified time.

The possible values for the *Time detail type parameter and the effect of each on the meaning of the result are summarized in the following table.

Example

Suppose you want to calculate the number of elapsed seconds from midnight when a meteor was observed through a telescope. For example, if the meteor was observed at 5:45 am, the number of elapsed seconds is 20,700. The following shows parameter specifications for the *TIME DETAILS built-in function that produce this result.

Time Increment

The *TIME INCREMENT built-in function lets you add a quantity to a given time.

It is the converse of the *ELAPSED TIME built-in function.

The *TIME INCREMENT built-in function performs the operation: *Time1 = *Time2 + *Elapsed Time

There are four parameters for this function type:

· Three input parameters

° *Time2 specifies the beginning time. If it is of type NBR, it is interpreted as the elapsed time since 0 am.

° *Elapsed time specifies the quantity to be added to *Time2.

° *Time unit specifies the meaning of the *Elapsed time input parameter. Refer to the table at the end of this description.

· One output parameter, *Time1, specifies the ending time. If it is of type NBR, it is interpreted as the elapsed time since 0 am.

The number of hours in the sum is factored by 24 to produce an integer from 0 to 23. In other words, if the number of hours is 24 or greater, the hours will be divided by 24. The final number of hours in the *Time1 parameter is the remainder of the division.

For example, if the sum is 64 hours and 32 minutes, the result in *Time1 will be 16 hours and 32 minutes (64/24=2 + a remainder of 16).

The possible values for the *Time unit parameter and the effect of each on the meaning of *Elapsed time are shown in the following table.

Example

Suppose you want to calculate the time a ticket reservation will be completed based on the time processing starts. For example, if an agent begins processing a ticket at 14:01 and it takes 17 minutes to process a ticket, the ticket reservation should be complete at 14:18. Following are parameter specifications for the *TIME INCREMENT built-in function that produce this result.

Post Comments