Send feedback on this topic.
Teradata.Client.Provider
Subtract(TdIntervalDayToSecond) Method



Teradata.Client.Provider Namespace > TdPeriodTimestampWithTimeZone Structure > Subtract Method : Subtract(TdIntervalDayToSecond) Method
The TdIntervalDayToSecond that will be subtracted from this instance of TdPeriodTimestampWithTimeZone.
Subtracts the specified TdIntervalDayToSecond from this instance of TdPeriodTimestampWithTimeZone.
Syntax
'Declaration
 
Public Overloads Function Subtract( _
   ByVal interval As TdIntervalDayToSecond _
) As TdPeriodTimestampWithTimeZone
'Usage
 
Dim instance As TdPeriodTimestampWithTimeZone
Dim interval As TdIntervalDayToSecond
Dim value As TdPeriodTimestampWithTimeZone
 
value = instance.Subtract(interval)

Parameters

interval
The TdIntervalDayToSecond that will be subtracted from this instance of TdPeriodTimestampWithTimeZone.

Return Value

A TdPeriodTimestampWithTimeZone is returned that is the result of subtracting the TdIntervalDayToSecond from this instance of TdPeriodTimestampWithTimeZone.
Exceptions
ExceptionDescription
Unable to subtract the specified TdIntervalDayToSecond from this instance of TdPeriodTimestampWithTimeZone.
The TdPeriodTimestampWithTimeZone beginning bound is greater or equal to the ending bound of the period.
Remarks

If interval or this instance of TdPeriodTimestampWithTimeZone is Null a TdPeriodTimestampWithTimeZone.Null will be returned.

The TdIntervalDayToSecond will be subtracted from both the beginning and ending bounds of the period. If the scale between this instance of TdPeriodTimestampWithTimeZone and the interval is different, the arithmetic operation will be performed using the different scales. The result will then be truncated to match the scale of the TdPeriodTimestampWithTimeZone.

For example, if the period is "2007-10-04 12:50:56.2123-08:00", "2007-11-01 13:23:54.4435-08:00") and the interval is "200 20:40:50.654321" (200 days, 20 hours, 40 minutes, 50 seconds and 654321 microseconds), the subtract operation will result in a period of ("2007-03-17 16:10:05.5579-08:00", "2007-04-14 16:43:03.7891-08:00").

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdPeriodTimestampWithTimeZone Structure
TdPeriodTimestampWithTimeZone Members
Overload List