Version

Subtraction(SmartDate,SmartDate) Operator

Deducts a SmartDate representing a starting moment-in-time from a SmartDate representing an ending moment-in-time to obtain the difference as a TimeSpan.
Syntax
'Declaration
 
Overloads Public Operator -( _
   ByVal endDateTime As SmartDate, _
   ByVal startDateTime As SmartDate _
) As TimeSpan
public TimeSpan operator -( 
   SmartDate endDateTime,
   SmartDate startDateTime
)

Parameters

endDateTime
The ending moment-in-time (subtrahend). This should be a larger date value than the startDateTime or the resulting TimeSpan comes out negative.
startDateTime
The starting moment-in-time (minuend).

Return Value

The difference, as a TimeSpan, between the endDateTime and the startDateTime.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also