TimeWithZone.Subtract Method (TimeWithZone, TimeWithZone)TimeWithZone.Subtract Method (TimeWithZone, TimeWithZone)TimeWithZone::Subtract Method (TimeWithZone, TimeWithZone)
Syntax
Public Shared Function Subtract( _ time1 As TimeWithZone, _ time2 As TimeWithZone _ ) As DayTimeDuration
public static DayTimeDuration Subtract( TimeWithZone time1, TimeWithZone time2 )
public: static DayTimeDuration Subtract( 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 |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |
ArgumentExceptionArgumentExceptionArgumentException | Exactly one of time1 and time2 has a time zone. |