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



Teradata.Client.Provider Namespace > TdTimestamp Structure > Subtraction Operator : Subtraction(TdTimestamp,TdIntervalYearToMonth) Operator
A TdTimestamp.
A TdIntervalYearToMonth that will be subtracted from TdTimestamp.
Subtracts the specified TdIntervalYearToMonth from a TdTimestamp.
Syntax
'Declaration
 
Overloads Public Operator -( _
   ByVal timestamp As TdTimestamp, _
   ByVal interval As TdIntervalYearToMonth _
) As TdTimestamp
'Usage
 
public TdTimestamp operator -( 
   TdTimestamp timestamp,
   TdIntervalYearToMonth interval
)
public:
TdTimestamp operator -( 
   TdTimestamp timestamp,
   TdIntervalYearToMonth interval
)

Parameters

timestamp
A TdTimestamp.
interval
A TdIntervalYearToMonth that will be subtracted from TdTimestamp.

Return Value

A TdTimestamp is returned that is the result of subtracting the TdIntervalYearToMonth from a TdTimestamp.
Exceptions
ExceptionDescription
Unable to subtract the specified TdIntervalYearToMonth from the TdTimestamp.
Remarks

If either parameter is Null a TdTimestamp.Null will be returned.

The interval interval will be subtracted from the TdTimestamp. For example, if the TdIntervalYearToMonth value of "10-03" (10 years, 3 months) is subtracted from the TdTimestamp value of "2008-10-10 12:50:56.2123" the operation will result in a TdTimestamp value of "1998-07-10 12:50:56" with 212300 microseconds.

Requirements

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

See Also

Reference

TdTimestamp Structure
TdTimestamp Members
Overload List