DateTimeWithZone.Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)DateTimeWithZone.Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)DateTimeWithZone::Subtract Method (DateTimeWithZone, DateTimeWithZone, TimeZone)

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
)
 

Return Value

Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration

The duration from dateTime2 to dateTime1.

Exceptions

ExceptionCondition
OverflowExceptionOverflowExceptionOverflowExceptionAn overflow error occurred.