DateTimeWithZone.Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)DateTimeWithZone.Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)DateTimeWithZone::Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)
Subtracts a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone value from a DateTimeWithZoneDateTimeWithZoneDateTimeWithZone value in the given time zone.
Syntax
Public Shared Function Subtract( _ dateTime1 As DateTimeWithZone, _ dateTime2 As DateTimeWithZone, _ implicitTimeZone As TimeZone _ ) As DayTimeDuration
public static DayTimeDuration Subtract( DateTimeWithZone dateTime1, DateTimeWithZone dateTime2, TimeZone implicitTimeZone )
public: static DayTimeDuration Subtract( DateTimeWithZone dateTime1, DateTimeWithZone dateTime2, TimeZone implicitTimeZone )
Parameters
- dateTime1
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
The DateTimeWithZoneDateTimeWithZoneDateTimeWithZone to subtract from.
- dateTime2
Type: XmlPrime.DateTimeWithZoneXmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone
The DateTimeWithZoneDateTimeWithZoneDateTimeWithZone to subtract.
- implicitTimeZone
Type: XmlPrime.TimeZoneXmlPrime.TimeZoneXmlPrime::TimeZone
The time zone to use if either DateTimeWithZoneDateTimeWithZoneDateTimeWithZone does not have a time zone.
Return Value
Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration
The duration from dateTime2 to dateTime1.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |