Send feedback on this topic.
Teradata.Client.Provider
Subtraction(TdTime,TimeSpan) Operator



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

Parameters

time
A TdTime.
span
A TimeSpan that will be subtracted from the TdTime.

Return Value

A TdTime is returned that is the result of subtracting the TimeSpan from the TdTime.
Remarks

If the time parameter is Null a TdTime.Null will be returned.

If the scale between the time and the span parameters 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") - TimeSpan.Parse("00:02:03.00009")

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

A TimeSpan can have a scale up to 7. A TdTime 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

TdTime Structure
TdTime Members
Overload List