DateWithZone.Subtract Method (DateWithZone, DateWithZone, TimeZone)DateWithZone.Subtract Method (DateWithZone, DateWithZone, TimeZone)DateWithZone::Subtract Method (DateWithZone, DateWithZone, TimeZone)
Subtracts a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone value from a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone value in the given
time zone.
Syntax
Public Shared Function Subtract( _ date1 As DateWithZone, _ date2 As DateWithZone, _ implicitTimeZone As TimeZone _ ) As DayTimeDuration
public static DayTimeDuration Subtract( DateWithZone date1, DateWithZone date2, TimeZone implicitTimeZone )
public: static DayTimeDuration Subtract( DateWithZone date1, DateWithZone date2, TimeZone implicitTimeZone )
Parameters
- date1
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DateWithZoneDateWithZoneDateWithZone to subtract from.
- date2
Type: XmlPrime.DateWithZoneXmlPrime.DateWithZoneXmlPrime::DateWithZone
The DateWithZoneDateWithZoneDateWithZone to subtract.
- implicitTimeZone
Type: XmlPrime.TimeZoneXmlPrime.TimeZoneXmlPrime::TimeZone
The time zone to use if either date does not have a time zone.
Return Value
Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration
The DayTimeDurationDayTimeDurationDayTimeDuration that is the result of subtracting date2 from date1.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |