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



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

Parameters

timeSpan
The TimeSpan that will be added.

Return Value

A TdDate is returned that is the result of the TimeSpan added to this instance of TdDate.
Exceptions
ExceptionDescription
Unable to add the specified TimeSpan to this instance of TdDate.
Remarks

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

The only component of the TimeSpan object that will be considered is the day component. When this operation is performed, the day component of the TimeSpan is added to the this instance of TdDate. For example, if the date is "2007-10-04" and TimeSpan is "0.02:00:00.00" (0 days, 2 hours) the add operation will result in "2007-10-04".

The number of days will be calculated from the components that were specified when TimeSpan was initialized. Therefore, if a TimeSpan were initialized as new TimeSpan(47, 60, 20) (47 hours, 60 minutes, 20 seconds), the number of days that will be added to TdDate will be 2.

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

TdDate Structure
TdDate Members
Overload List