The number of hours between times.
Hours = SRP_Time("HourSpan", FromTime, ToTime, Fractional) |
The number of hours between two times
Parameter | Description |
---|---|
FromTime | A starting time in OI internal format. (REQUIRED) |
ToTime | An ending time in OI internal format. (REQUIRED) |
Fractional | Determines if the span should be in whole hours or fractional hours. (OPTIONAL) |
The "HourSpan" service calculates the number of hours between two times. The result will be positive if the starting time comes before the ending time and negative if the ending time comes first.
If Fractional is set to 1, which is the default, you will get a decimal number if the minute and second are not the same for each time. If you want whole hours only, set Fractional to 0.
// Get the number of hours between two times From = SRP_Time("Parse", "7:51:43am", "h:mm:sstt") To = SRP_Time("Parse", "12:41:08pm", "h:mm:sstt") Hours = SRP_Time("HourSpan", From, To) // Get the number of whole hours Hours = SRP_Time("HourSpan", From, To, 0) |