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



Teradata.Client.Provider Namespace > TdPeriodTime Structure : Compare Method
An instance of TdPeriodTime.
An instance of TdPeriodTime.
Compares two instances of TdPeriodTime 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 TdPeriodTime, _
   ByVal right As TdPeriodTime _
) As Integer
'Usage
 
Dim left As TdPeriodTime
Dim right As TdPeriodTime
Dim value As Integer
 
value = TdPeriodTime.Compare(left, right)
public static int Compare( 
   TdPeriodTime left,
   TdPeriodTime right
)
public:
static int Compare( 
   TdPeriodTime left,
   TdPeriodTime right
) 

Parameters

left
An instance of TdPeriodTime.
right
An instance of TdPeriodTime.

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 TdPeriodTime.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

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdPeriodTime Structure
TdPeriodTime Members
CompareTo(TdPeriodTime) Method