compareTime
compareTime(t_time1t_time2) =>x_difference
Description
Compares two string arguments, representing a clock-calendar time.
Arguments
|
First string in the month day hour:minute:second year format. |
|
|
Second string in the month day hour:minute:second year format. |
Value Returned
|
An integer representing a time that is later than (positive), equal to (zero), or earlier than (negative) the second argument. The units are seconds. |
Examples
In the following example, 687,777 seconds have occurred between the two dates given. For a positive number of seconds, the most recent date needs to be given as the first argument.
compareTime( "Apr 8 4:21:39 1991" "Apr 16 3:24:36 1991")
=> -687777.
In the following example, 600 seconds (10 minutes) have occurred between the two dates.
compareTime("Apr 16 3:24:36 1991" "Apr 16 3:14:36 1991")
=> 600
Related Topics
Logical and Relational Functions
Return to top