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



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

Parameters

timeSpan
The TimeSpan that will be added.

Return Value

A TdPeriodTimeWithTimeZone is returned that is the result of the TimeSpan added to this instance of TdPeriodTimeWithTimeZone.
Exceptions
ExceptionDescription
An invalid period will result in this operation.
Remarks

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

The only component of the TimeSpan object that will be considered is the time component. When this operation is performed, the time component of the TimeSpan is added to the this instance of TdPeriodTimeWithTimeZone. For example, if the period is "01:00:00-08:00, 01:30:00-08:00" and TimeSpan is "1.02:00:00.00" (1 day, 2 hours) the add operation will result in a period of (03:00:00-08:00, 03:30:00-08:00).

When adding a TimeSpan to a TdPeriodTimeWithTimeZone it is possible that the ending bound will roll into the next 24 hours, or the beginning bound will roll into the previous 24 hours. For example, suppose the period is

   (19:32:32.3404-08:00, 22:00:00.3232-08:00)

Adding the TimeSpan of "03:00:00" (3 hours) to the period will cause the ending bound to roll into the next 24 hours which will result in the invalid period:

    (22:32:32.3404-08:00, '01:00:00.3232-08:00)

Subtracting the TimeSpan of "20:00:00" (20 hours) to the same period will cause the beginning period to roll back into the previous 24 hours which results in the invalid period:

    (23:32:32.3404-08:00, 02:00:00.3232-08:00)

Refer to Period Arithmetic for additional information.

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

TdPeriodTimeWithTimeZone Structure
TdPeriodTimeWithTimeZone Members
Overload List