DateTime.Subtract Method (DateTime)
Subtracts a specified DateTime object from the current DateTime object, yielding a specific period of time.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
public TimeSpan Subtract (
DateTimeval
)
Parameters
- val
A DateTime object specifying the date/time value that is the subtrahend.
Return Value
A TimeSpan object specifying the time period that results from the subtraction of the val parameter from the current DateTime object.
Version Information
Available in .NET Micro Framework version 2.0, 2.5