Send feedback on this topic.
Teradata.Client.Provider
Subtraction(TdDate,TdIntervalDayToSecond) Operator



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

Parameters

date
A TdDate.
interval
A TdIntervalDayToSecond that will be subtracted from a TdDate.

Return Value

A TdDate is returned that is the result of subtracting the TdIntervalDayToSecond from a TdDate.
Exceptions
ExceptionDescription
Unable to subtract the interval from a TdDate.
Remarks

If the interval or date is Null a TdDate.Null will be returned.

The only component of the TdIntervalDayToSecond that will be considered is the day component. When this operation is performed, the TdIntervalDayToSecond.Days component of the TdIntervalDayToSecond is subtracted from a TdDate. For example, if the date is "2007-10-09" and the interval is "5 03:20:30" (5 days, 3 hours, 20 minutes and 30 seconds) the operation will result in "2007-10-04".

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdDate Structure
TdDate Members
Overload List