TimeWithZone.Subtraction Operator (TimeWithZone, TimeWithZone)TimeWithZone.Subtraction Operator (TimeWithZone, TimeWithZone)TimeWithZone::Subtraction Operator (TimeWithZone, TimeWithZone)
Syntax
Public Shared Operator -( _ time1 As TimeWithZone, _ time2 As TimeWithZone _ ) As DayTimeDuration
public static DayTimeDuration operator -( TimeWithZone time1, TimeWithZone time2 )
public: static DayTimeDuration operator -( TimeWithZone time1, TimeWithZone time2 )
Parameters
- time1
Type: XmlPrime.TimeWithZoneXmlPrime.TimeWithZoneXmlPrime::TimeWithZone
The TimeWithZoneTimeWithZoneTimeWithZone to subtract from.
- time2
Type: XmlPrime.TimeWithZoneXmlPrime.TimeWithZoneXmlPrime::TimeWithZone
The TimeWithZoneTimeWithZoneTimeWithZone to subtract.
Return Value
Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration
The duration from time2 to time1.
Exceptions
Exception | Condition |
ArgumentExceptionArgumentExceptionArgumentException | Exactly one of time1 and time2 has a time zone. |