DateTime.Subtraction Operator


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Subtracts a specified DateTime orTimeSpan from a specified DateTime.

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

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(DateTime, DateTime)

Subtracts a specified date and time from another specified date and time and returns a time interval.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(DateTime, TimeSpan)

Subtracts a specified time interval from a specified date and time and returns a new date and time.

Return to top