DateTime.Subtract Method (TimeSpan)
Subtracts a specified time period from the current DateTime object, yielding a new DateTime object.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
public DateTime Subtract (
TimeSpanval
)
Parameters
- val
A TimeSpan object specifying the time period that is the subtrahend.
Return Value
A DateTime object 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