Send feedback on this topic.
Teradata.Client.Provider
Subtraction(TdPeriodTimeWithTimeZone,TdIntervalDayToSecond) Operator



Teradata.Client.Provider Namespace > TdPeriodTimeWithTimeZone Structure > Subtraction Operator : Subtraction(TdPeriodTimeWithTimeZone,TdIntervalDayToSecond) Operator
A TdPeriodTimeWithTimeZone.
The TdIntervalDayToSecond interval will be subtracted from a TdPeriodTimeWithTimeZone.
Subtracts the specified TdIntervalDayToSecond from a TdPeriodTimeWithTimeZone.
Syntax
'Declaration
 
Overloads Public Operator -( _
   ByVal period As TdPeriodTimeWithTimeZone, _
   ByVal interval As TdIntervalDayToSecond _
) As TdPeriodTimeWithTimeZone
'Usage
 

Parameters

period
A TdPeriodTimeWithTimeZone.
interval
The TdIntervalDayToSecond interval will be subtracted from a TdPeriodTimeWithTimeZone.

Return Value

A TdPeriodTimeWithTimeZone is returned that is the result of subtracting the TdIntervalDayToSecond from a TdPeriodTimeWithTimeZone.
Exceptions
ExceptionDescription
Unable to subtract the specified TdIntervalDayToSecond from a TdPeriodTimeWithTimeZone.
Remarks

If period or the interval is Null a TdPeriodTimeWithTimeZone.Null will be returned.

When this operation is performed, the day component of the interval is ignored. Only the hour, minute, and second components are used in this operation. For example, if the period is "05:00:00-08:00, 06:30:00-08:00" and the interval is "1 02:00:00.00" (1 day, 2 hours) the subtract operation will result in a period of "03:00:00-08:00, 04:30:00-08:00".

When subtracting a interval from 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)

Subtracting the interval of "0 20:00:00" (20 hours) from the period will cause the beginning bound 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)

Subtracting the interval of "-0 03:00:00" (-3 hours) from 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)
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