Description:
An object which represents an elapsed span of time. It does not include specific dates or times, only the duration.
Properties:
Argument |
Type |
Description |
---|---|---|
Days |
Numeric |
The total number of days represented by this instance. |
Hours |
Numeric |
The total number of hours represented by this instance. |
Minutes |
Numeric |
The total number of minutes represented by this instance. |
Seconds |
Numeric |
The total number of seconds represented by this instance. |
Methods:
Argument |
Returns |
Description |
FractionOf |
Numeric |
Returns the fraction of time represented by this instance in relation to another. |
Operators:
Expression |
Returns |
TimeSpan + TimeSpan |
TimeSpan |
TimeSpan - TimeSpan |
TimeSpan |
TimeSpan == TimeSpan & TimeSpan != TimeSpan |
Boolean |
TimeSpan > TimeSpan & TimeSpan >= TimeSpan |
Boolean |
TimeSpan < TimeSpan, TimeSpan <= TimeSpan |
Boolean |
Example:
Create a time span which represents 12 hours, 50 seconds
Expression |
Result |
TimeSpan(12,0,50) |
12:00:50 |
Adding/Subtracting time spans
Expression |
Result |
TimeSpan(12,0,50) - TimeSpan(12,0,0) |
00:00:50 |
TimeSpan(12,0,50) + TimeSpan(12,0,0) |
1.00:00:50 |