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



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

Parameters

timeSpan
The TimeSpan that will be subtracted.

Return Value

A TdPeriodTimestamp is returned that is the result of the TimeSpan subtracted from this instance of TdPeriodTimestamp.
Exceptions
ExceptionDescription
The result could not be represented as a TdPeriodTimestamp.
The TdPeriodTimestamp beginning bound is greater or equal to the ending bound of the period.
Remarks

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

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

Refer to Period Arithmetic for more information.

Requirements
ProductVersionsPlatforms
.NET6, 7Windows, Linux, MacOS
.NET Framework4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdPeriodTimestamp Structure
TdPeriodTimestamp Members
Overload List