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



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

Parameters

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

Return Value

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

If the time is Null a TdTimeWithTimeZone.Null is returned.

If the scale between the time and the span 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

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

See Also

Reference

TdTimeWithTimeZone Structure
TdTimeWithTimeZone Members
Overload List