TimeWithZone.Subtract Method (TimeWithZone, TimeWithZone)TimeWithZone.Subtract Method (TimeWithZone, TimeWithZone)TimeWithZone::Subtract Method (TimeWithZone, TimeWithZone)

Syntax

Public Shared Function Subtract( _
    time1 As TimeWithZone, _
    time2 As TimeWithZone _
) As DayTimeDuration
public static DayTimeDuration Subtract(
    TimeWithZone time1,
    TimeWithZone time2
)
public:
static DayTimeDuration Subtract(
    TimeWithZone time1, 
    TimeWithZone time2
)
 

Return Value

Type: XmlPrime.DayTimeDurationXmlPrime.DayTimeDurationXmlPrime::DayTimeDuration

The duration from time2 to time1.

Exceptions

ExceptionCondition
OverflowExceptionOverflowExceptionOverflowExceptionAn overflow error occurred.
ArgumentExceptionArgumentExceptionArgumentException Exactly one of time1 and time2 has a time zone.