Compartir a través de


DateTime.operator - Method (DateTime, TimeSpan)

Subtracts a specified period of time from a specified DateTime object, yielding a new DateTime object.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public static DateTime operator - (
         DateTimed,
         TimeSpant
)

Parameters

  • d
    A DateTime object that specifies the date and time.
  • t
    A TimeSpan object that specifies the time period.

Return Value

A DateTime object that results from the subtraction of the t object from the d object.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

DateTime Structure
DateTime Members
System Namespace