DateWithZone.Subtraction Operator (DateWithZone, YearMonthDuration)DateWithZone.Subtraction Operator (DateWithZone, YearMonthDuration)DateWithZone::Subtraction Operator (DateWithZone, YearMonthDuration)
Subtracts a YearMonthDurationYearMonthDurationYearMonthDuration from a DateWithZoneDateWithZoneDateWithZone
Syntax
Public Shared Operator -( _ date As DateWithZone, _ duration As YearMonthDuration _ ) As DateWithZone
public static DateWithZone operator -( DateWithZone date, YearMonthDuration duration )
public: static DateWithZone operator -( DateWithZone date, YearMonthDuration duration )
Parameters
- date
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DateWithZoneDateWithZoneDateWithZone to subtract from.
- duration
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to subtract.
Return Value
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DayTimeDurationDayTimeDurationDayTimeDuration which is the result of subtracting duration from date.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |