xHarbour Reference Documentation > Function Reference |
Calculates the time elapsed between a start and an end time.
ElapTime( <cStartTime>, <cEndTime> ) --> cElapsedTime
The function returns a time-formatted character string holding the duration of the time interval in the format hh:mm:ss.
This function returns a string that shows the difference between the starting time represented as <cStartTime> and the ending time as <cEndTime>. If the starting time is later than the ending time, the function assumes that the end time occured on the next day.
See also: | Days(), Time(), Secs(), Seconds() |
Category: | Date and time |
Source: | rtl\samples.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows return values of ElapTime() PROCEDURE Main LOCAL cStartTime := "17:30:15" ? ElapTime( cStartTime, "21:45:30" ) // result: 04:15:15 ? ElapTime( cStartTime, "07:45:30" ) // result: 14:15:15 RETURN
http://www.xHarbour.com