Mono Class Library: System.DateTime Overview | Members

System.DateTime.Subtract Method

Subtracts a specified TimeSpan from the current instance.

public DateTime Subtract (TimeSpan value)

Parameters

value
An instance of TimeSpan.

Returns

A new DateTime instance equal to the date and time represented by the current instance minus the time interval of the specified TimeSpan.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe resulting date and time is less than DateTime.MinValue or greater than DateTime.MaxValue.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0