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



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

Parameters

interval
The number of years and months from this TdIntervalYearToMonth interval that will be subtracted from this instance of TdPeriodDate.

Return Value

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

If interval or this instance of TdPeriodDate 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 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdPeriodDate Structure
TdPeriodDate Members
Overload List