DateTimeWithZone.Addition Operator (DateTimeWithZone, YearMonthDuration)DateTimeWithZone.Addition Operator (DateTimeWithZone, YearMonthDuration)DateTimeWithZone::Addition Operator (DateTimeWithZone, YearMonthDuration)
Adds a YearMonthDurationYearMonthDurationYearMonthDuration to a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone.
Syntax
Public Shared Operator +( _ dateTime As DateTimeWithZone, _ duration As YearMonthDuration _ ) As DateTimeWithZone
public static DateTimeWithZone operator +( DateTimeWithZone dateTime, YearMonthDuration duration )
public: static DateTimeWithZone operator +( DateTimeWithZone dateTime, YearMonthDuration duration )
Parameters
- dateTime
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
The DateTimeWithZoneDateTimeWithZoneDateTimeWithZone to add to.
- duration
Type: XmlPrime.YearMonthDurationXmlPrime.YearMonthDurationXmlPrime::YearMonthDuration
The YearMonthDurationYearMonthDurationYearMonthDuration to add.
Return Value
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
A DateTimeWithZoneDateTimeWithZoneDateTimeWithZone that is the sum of dateTime and duration.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |