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



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

Parameters

left
An instance of TdPeriodTimestamp.
right
An instance of TdPeriodTimestamp.

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 TdPeriodTimestamp.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 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdPeriodTimestamp Structure
TdPeriodTimestamp Members
CompareTo(TdPeriodTimestamp) Method