DateTime::Subtraction Operator (DateTime, DateTime)
Silverlight
Subtracts a specified date and time from another specified date and time and returns a time interval.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- d1
- Type: System::DateTime
The date and time value to subtract from (the minuend).
- d2
- Type: System::DateTime
The date and time value to subtract (the subtrahend).
The Subtraction(DateTime, DateTime) method does not consider the value of the Kind property of the two DateTime values when performing the subtraction. Before subtracting DateTime objects, ensure that the objects represent times in the same time zone. Otherwise, the result will include the difference between time zones.
Note: |
|---|
The DateTimeOffset::Subtraction(DateTimeOffset, DateTimeOffset) method does consider the difference between time zones when performing the subtraction. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Community Additions
ADD
Show:
Note: