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



Teradata.Client.Provider Namespace > TdTimestampWithTimeZone Structure > Add Method : Add(TimeSpan) Method
The TimeSpan that will be added.
The specified TimeSpan will be added to this instance of TdTimestampWithTimeZone.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal timeSpan As TimeSpan _
) As TdTimestampWithTimeZone
'Usage
 
Dim instance As TdTimestampWithTimeZone
Dim timeSpan As TimeSpan
Dim value As TdTimestampWithTimeZone
 
value = instance.Add(timeSpan)

Parameters

timeSpan
The TimeSpan that will be added.

Return Value

A TdTimestampWithTimeZone is returned that is the result of the TimeSpan added to this instance of TdTimestampWithTimeZone.
Exceptions
ExceptionDescription
The result could not be represented as a TdTimestampWithTimeZone.
Remarks

If this instance of TdTimestampWithTimeZone is Null a TdTimestampWithTimeZone.Null will be returned.

The TimeSpan object can contain data about the number of days, hours, minutes, seconds, and fractional seconds.

If the scale between this instance of TdTimestampWithTimeZone 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 timestamp. For example, the addition operation

TdTimestampWithTimeZone.Parse("2008-10-10 12:48:53.2123+08:00") + TimeSpan.Parse("00:02:03.000099")

results in a TdTimestampWithTimeZone value of "2008-10-10 12:50:56.2123+08:00".

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

TdTimestampWithTimeZone Structure
TdTimestampWithTimeZone Members
Overload List