Send feedback on this topic.
Teradata.Client.Provider
Subtraction(TdPeriodDate,TdIntervalYearToMonth) Operator



Teradata.Client.Provider Namespace > TdPeriodDate Structure > Subtraction Operator : Subtraction(TdPeriodDate,TdIntervalYearToMonth) Operator
A TdPeriodDate.
The number of years and months from the TdIntervalYearToMonth that will be subtracted from a TdPeriodDate.
Subtracts the specified TdIntervalYearToMonth from a TdPeriodDate.
Syntax
'Declaration
 
Overloads Public Operator -( _
   ByVal period As TdPeriodDate, _
   ByVal interval As TdIntervalYearToMonth _
) As TdPeriodDate
'Usage
 
public TdPeriodDate operator -( 
   TdPeriodDate period,
   TdIntervalYearToMonth interval
)
public:
TdPeriodDate operator -( 
   TdPeriodDate period,
   TdIntervalYearToMonth interval
)

Parameters

period
A TdPeriodDate.
interval
The number of years and months from the TdIntervalYearToMonth that will be subtracted from a TdPeriodDate.

Return Value

A TdPeriodDate is returned that is the result of subtracting the TdIntervalYearToMonth from a TdPeriodDate.
Exceptions
ExceptionDescription
Unable to subtract the specified TdIntervalYearToMonth from a TdPeriodDate.
The TdPeriodDate beginning bound is greater or equal to the ending bound of the period.
Remarks

If interval or period is Null a TdPeriodDate.Null will be returned.

When this operation is performed, the number of years and months is subtracted from both the beginning and ending bounds. For example, if the period is ('2007-10-04', '2007-11-01') and the number of years and months is 1 year, 2 months the subtract operation will result in ('2006-08-02', '2006-08-30').

Requirements

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

See Also

Reference

TdPeriodDate Structure
TdPeriodDate Members
Overload List