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



Teradata.Client.Provider Namespace > TdTimeWithTimeZone Structure > Addition Operator : Addition(TdTimeWithTimeZone,TimeSpan) Operator
A TdTimeWithTimeZone.
A TimeSpan that will be added to TdTimeWithTimeZone.
Adds the specified TimeSpan to 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 added to TdTimeWithTimeZone.

Return Value

A TdTimeWithTimeZone is returned that is the result of adding the Timespan to 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 addition operation

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

results in a TdTime value of "12:50:56.2123+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