DateTimeWithZone.Add Method (DateTimeWithZone, YearMonthDuration)DateTimeWithZone.Add Method (DateTimeWithZone, YearMonthDuration)DateTimeWithZone::Add Method (DateTimeWithZone, YearMonthDuration)
Adds a YearMonthDurationYearMonthDurationYearMonthDuration to a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone.
Syntax
Public Shared Function Add( _ dateTime As DateTimeWithZone, _ duration As YearMonthDuration _ ) As DateTimeWithZone
public static DateTimeWithZone Add( DateTimeWithZone dateTime, YearMonthDuration duration )
public: static DateTimeWithZone Add( 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 result of duration added to dateTime.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |