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



Teradata.Client.Provider Namespace > TdTimeWithTimeZone Structure > Subtract Method : Subtract(TimeSpan) Method
The TimeSpan that will be subtracted.
The specified TimeSpan will be subtracted from this instance of TdTimeWithTimeZone.
Syntax
'Declaration
 
Public Overloads Function Subtract( _
   ByVal timeSpan As TimeSpan _
) As TdTimeWithTimeZone
'Usage
 
Dim instance As TdTimeWithTimeZone
Dim timeSpan As TimeSpan
Dim value As TdTimeWithTimeZone
 
value = instance.Subtract(timeSpan)
public TdTimeWithTimeZone Subtract( 
   TimeSpan timeSpan
)
public:
TdTimeWithTimeZone Subtract( 
   TimeSpan timeSpan
) 

Parameters

timeSpan
The TimeSpan that will be subtracted.

Return Value

A TdTimeWithTimeZone is returned that is the result of the TimeSpan subtracted from this instance of TdTimeWithTimeZone.
Remarks

If this instance of TdTimeWithTimeZone is Null a TdTimeWithTimeZone.Null is returned.

The TimeSpan object can contain data about the number of days, hours, minutes, seconds, and fractional seconds. If the time rolls into the next or previous day, the result will only contain the time component. For example, subtracting 2 hours from "01:54:00-08:00" will result in "23:54:00-08:00".

If the scale between this instance of TdTimeWithTimeZone and the timeSpan 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 time. For example, the subtraction operation

TdTime.Parse("12:48:53.2123+08:00") - TimeSpan.Parse("00:02:03.00009")

results in a TdTime value of "12:46:50.2122+08:00".

A TimeSpan can have a scale up to 7. A TdTimeWithTimeZone has a maximum scale of 6. When performing an arithmetic operation, only the first 6 digits to the right of the decimal point of the TimeSpan operand will be considered. The 7th digit will be ignored.

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

TdTimeWithTimeZone Structure
TdTimeWithTimeZone Members
Overload List