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



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

Parameters

timeSpan
The TimeSpan that will be added.

Return Value

A TdTime is returned that is the result of the TimeSpan added to this instance of TdTime.
Remarks

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

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

If the scale between this instance of TdTime 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 addition operation

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

results in a TdTime value of "12:50:56.2123".

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

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdTime Structure
TdTime Members
Overload List