DateWithZone.Subtraction Operator (DateWithZone, DateWithZone)DateWithZone.Subtraction Operator (DateWithZone, DateWithZone)DateWithZone::Subtraction Operator (DateWithZone, DateWithZone)

Syntax

Public Shared Operator -( _
    date1 As DateWithZone, _
    date2 As DateWithZone _
) As DayTimeDuration
public static DayTimeDuration operator -(
    DateWithZone date1,
    DateWithZone date2
)
public:
static DayTimeDuration operator -(
    DateWithZone date1, 
    DateWithZone date2
)
 

Return Value

Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration

The duration from date2 to date1.

Exceptions

ExceptionCondition
ArgumentExceptionArgumentExceptionArgumentException Exactly one of date1 and date2 has a time zone.
OverflowExceptionOverflowExceptionOverflowExceptionAn overflow error occurred.