Send feedback on this topic.
Teradata.Client.Provider
CompareTo(TdTimeWithTimeZone) Method



Teradata.Client.Provider Namespace > TdTimeWithTimeZone Structure > CompareTo Method : CompareTo(TdTimeWithTimeZone) Method
The TdTimeWithTimeZone to compare against.
Compares this instance to the specified TdTimeWithTimeZone other.
Syntax
'Declaration
 
Public Overloads Function CompareTo( _
   ByVal other As TdTimeWithTimeZone _
) As Integer
'Usage
 
Dim instance As TdTimeWithTimeZone
Dim other As TdTimeWithTimeZone
Dim value As Integer
 
value = instance.CompareTo(other)
public int CompareTo( 
   TdTimeWithTimeZone other
)
public:
int CompareTo( 
   TdTimeWithTimeZone other
) 

Parameters

other
The TdTimeWithTimeZone to compare against.

Return Value

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

The integer returned when this instance is compared to other indicates the following:

Return Value Meaning
Less than Zero

This instance is less than other.

-or-

This instance is TdTimeWithTimeZone.Null.

Zero

This instance is equal to other.

-or-

This instance is Null and value is Null.

Greater than Zero

This instance is greater than other.

-or-

other is Null.

When a comparison is performed between TdTimeWithTimeZone values, the UTC offset is taken into account. The UTC offset is subtracted from the time which results in the UTC Time. It is possible that a value can roll into the next or previous day. If this should occur only the time component is considered in the comparison. The following table shows the result of several comparisons between TdTimeWithTimeZone values:

Comparison Result
"12:21:00+01:01" compare to "09:11:00-02:10" 0 -- both values are equal.
"20:21:00-04:00" compare to "09:11:00+02:10" -1 -- the left operand is less than the right.
"01:54:00+03:00" compare to "19:11:00-01:00" 1 -- the left operand is greater than the right.

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

TdTimeWithTimeZone Structure
TdTimeWithTimeZone Members
Overload List