System::DateTime::operator- 方法
DateTime::operator-(DateTime) const method
返回一个 TimeSpan 类的实例,表示当前对象和指定对象所表示的日期和时间值之间的时间间隔。
TimeSpan System::DateTime::operator-(DateTime value) const
| Parameter | Type | 描述 |
|---|---|---|
| value | DateTime | 一个 DateTime 类的实例,标记要计算的区间的一端。 |
ReturnValue
一个 TimeSpan 类的实例,表示当前对象和 value 之间的日期和时间值的时间间隔。
另见
- Class TimeSpan
- Class DateTime
- Class DateTime
- Namespace System
- Library Aspose.Page for C++
DateTime::operator-(TimeSpan) const method
返回一个新的 DateTime 类实例,表示从当前对象表示的值减去指定时间跨度后的日期和时间值。
DateTime System::DateTime::operator-(TimeSpan value) const
| Parameter | Type | 描述 |
|---|---|---|
| value | TimeSpan | 要减去的时间间隔 |
ReturnValue
一个新的 DateTime 类实例,表示从当前对象所表示的值中减去 value 后得到的日期和时间值。
另见
- Class DateTime
- Class TimeSpan
- Class DateTime
- Namespace System
- Library Aspose.Page for C++