DateWithZone.Subtract Method (DateWithZone, DateWithZone)DateWithZone.Subtract Method (DateWithZone, DateWithZone)DateWithZone::Subtract Method (DateWithZone, DateWithZone)

Syntax

Public Shared Function Subtract( _
    date1 As DateWithZone, _
    date2 As DateWithZone _
) As DayTimeDuration
public static DayTimeDuration Subtract(
    DateWithZone date1,
    DateWithZone date2
)
public:
static DayTimeDuration Subtract(
    DateWithZone date1, 
    DateWithZone date2
)
 

Return Value

Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration

The duration from date2 to date1.

Exceptions

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