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



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

Parameters

left
An instance of TdPeriodDate.
right
An instance of TdPeriodDate.

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

TdPeriodDate Structure
TdPeriodDate Members
CompareTo(TdPeriodDate) Method