DateTimeWithZone.Subtract Method (DateTimeWithZone, YearMonthDuration)DateTimeWithZone.Subtract Method (DateTimeWithZone, YearMonthDuration)DateTimeWithZone::Subtract Method (DateTimeWithZone, YearMonthDuration)
Subtracts a YearMonthDurationYearMonthDurationYearMonthDuration from a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone
Syntax
Public Shared Function Subtract( _ dateTime As DateTimeWithZone, _ duration As YearMonthDuration _ ) As DateTimeWithZone
public static DateTimeWithZone Subtract( DateTimeWithZone dateTime, YearMonthDuration duration )
public: static DateTimeWithZone Subtract( DateTimeWithZone dateTime, YearMonthDuration duration )
Parameters
- dateTime
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
The DateTimeWithZoneDateTimeWithZoneDateTimeWithZone to subtract from.
- duration
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to subtract.
Return Value
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
The DateTimeWithZoneDateTimeWithZoneDateTimeWithZone that is the result of subtracting duration from dateTime.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |