DateWithZone.Subtraction Operator (DateWithZone, DateWithZone)DateWithZone.Subtraction Operator (DateWithZone, DateWithZone)DateWithZone::Subtraction Operator (DateWithZone, DateWithZone)
Syntax
Public Shared Operator -( _ date1 As DateWithZone, _ date2 As DateWithZone _ ) As DayTimeDuration
public static DayTimeDuration operator -( DateWithZone date1, DateWithZone date2 )
public: static DayTimeDuration operator -( DateWithZone date1, DateWithZone date2 )
Parameters
- date1
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DateWithZoneDateWithZoneDateWithZone to subtract from.
- date2
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DateWithZoneDateWithZoneDateWithZone to subtract.
Return Value
Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration
The duration from date2 to date1.
Exceptions
Exception | Condition |
ArgumentExceptionArgumentExceptionArgumentException | Exactly one of date1 and date2 has a time zone. |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |