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



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

Parameters

interval
A TdIntervalDayToSecond that will be subtracted from this instance of TdTime.

Return Value

A TdTime is returned that is the result of subtracting the TdIntervalDayToSecond from this instance of TdTime.
Remarks

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

The TdIntervalDayToSecond interval will be subtracted from this instance of TdTime.

The TdIntervalDayToSecond interval may contain data about the number of days, hours, minutes, seconds, and sub-seconds. The days will be discarded during all calculations. If the time rolls into the next or previous day, the result will only contain the time component. For example, adding 2 hours to "23:54:00" will result in a TdTime value of "01:54:00".

If the scale between this instance of TdTime and the interval parameter are different, the arithmetic operation will be performed using the different scales. The result will then be truncated to match the scale of the TdTime. For example, if the TdIntervalDayToSecond value of "222 10:25:40.61234" (222 days, 10 hours, 25 minutes and 40.61234 seconds) is subtracted from the TdTime value of "12:50:56.2123" the operation will result in a TdTime value of "02:25:15.5999".

Requirements

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

See Also

Reference

TdTime Structure
TdTime Members
Overload List