DB2DateTime.CompareTo(object obj) method
Determines whether the specified object value is earlier, later, or the same as the DB2DateTime instance value.
The DB2DateTime.CompareTo(object obj) method is available for use only with the Informix® database server.
- Namespace:
IBM.Data.DB2Types- Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)
Syntax
[Visual Basic]
Public Shared Function CompareTo (obj As object) As Int32
[C#]
public static Int32 CompareTo (object obj)
[C++]
public:
static Int32 CompareTo (object obj)
[JScript]
public static function CompareTo (object : obj) : Int32
Parameters
- obj
- The object that you want to compare to the DB2DateTime instance value from which the CompareTo() method is called. The object must be a DB2DateTime instance.
Return value
An integer return value that
is based on the relative values of the obj DB2DateTime instance
and the DB2DateTime instance.
| Value | Description |
|---|---|
| -1 | The value of the DB2DateTime instance, from which the CompareTo() method is called, is earlier than the obj parameter value. |
| 0 | The value of the DB2DateTime instance, from which the CompareTo() method is called, is the same as the obj parameter value. |
| 1 | The value of the DB2DateTime instance, from which the CompareTo() method is called, is later than the obj parameter value. |