## DateTime::operator-= method


Sets the current object to the date and time value that is the result of subtraction of the specified time span from the date and time value represented by the current object.

```cpp
DateTime & System::DateTime::operator-=(TimeSpan value)
```


| Parameter | Type | Description |
| --- | --- | --- |
| value | TimeSpan | The time span to subtract |

### ReturnValue

A reference to the self

## See Also

* Class [DateTime](../)
* Class [TimeSpan](../../timespan/)
* Class [DateTime](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
es represented by the current object and **value**.

## See Also

* Class [TimeSpan](../../timespan/)
* Class [DateTime](../)
* Class [DateTime](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
## DateTime::operator-(TimeSpan) const method


Returns a new instance of the [DateTime](../) class representing the date and time value which is the result of subtraction of the specified time span from the value represented by the current object.

```cpp
DateTime System::DateTime::operator-(TimeSpan value) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| value | TimeSpan | A time interval to subtract |

### ReturnValue

A new instance of the [DateTime](../) class representing the date and time value which is the result of subtraction of **value** from the value represented by the current object.

## See Also

* Class [DateTime](../)
* Class [TimeSpan](../../timespan/)
* Class [DateTime](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
