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