Send feedback on this topic.
Teradata.Client.Provider
Compare Method (TdPeriodTimeWithTimeZone)



Teradata.Client.Provider Namespace > TdPeriodTimeWithTimeZone Structure : Compare Method
An instance of TdPeriodTimeWithTimeZone.
An instance of TdPeriodTimeWithTimeZone.
Compares two instances of TdPeriodTimeWithTimeZone structures and returns a value indicating whether left is greater than, less than or equal to right.
Syntax
'Declaration
 
Public Shared Function Compare( _
   ByVal left As TdPeriodTimeWithTimeZone, _
   ByVal right As TdPeriodTimeWithTimeZone _
) As Integer
'Usage
 
Dim left As TdPeriodTimeWithTimeZone
Dim right As TdPeriodTimeWithTimeZone
Dim value As Integer
 
value = TdPeriodTimeWithTimeZone.Compare(left, right)
public static int Compare( 
   TdPeriodTimeWithTimeZone left,
   TdPeriodTimeWithTimeZone right
)
public:
static int Compare( 
   TdPeriodTimeWithTimeZone left,
   TdPeriodTimeWithTimeZone right
) 

Parameters

left
An instance of TdPeriodTimeWithTimeZone.
right
An instance of TdPeriodTimeWithTimeZone.

Return Value

The result of the comparison is returned as an integer.
Remarks

The beginning and ending bounds of the two period operands are used in the comparison. The integer returned when the bounds of the left is compared to right operand indicates the following:

Return Value Meaning
Less than zero

left is less than right.

-or-

left is TdPeriodTimeWithTimeZone.Null.


Comparison Algorithm

left.Begin < right.Begin OR (left.Begin == right.Begin AND left.End < right.End)

Zero

left is equal to right.

-or-

left and right are Null.


Comparison Algorithm

left.Begin == right.Begin AND left.End == right.End

Greater than zero

left is greater than right.

-or-

right is Null.


Comparison Algorithm

left.Begin > right.Begin OR (left.Begin == right.Begin AND left.End > right.End)

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
CompareTo(TdPeriodTimeWithTimeZone) Method