title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic |
---|---|---|---|---|---|---|---|
compareTo Method (DateTimeOffset) |
compareTo Method (DateTimeOffset) |
David-Engel |
v-davidengel |
01/19/2017 |
sql |
connectivity |
reference |
[!INCLUDEDriver_JDBC_Download]
Compares this DateTimeOffset object to another DateTimeOffset object based on the time at GMT.
public int compareTo(DateTimeOffset other)
A DateTimeOffset value that you want to compare to the current instance.
The following table describes the return value of this method:
Return value | Description |
---|---|
0 | Both DateTimeOffset objects represent the same point in time. |
negative number | This DateTimeOffset object represents a point in time that is before other. |
positive number | This DateTimeOffset object represents a point in time that is after other. |
When two DateTimeOffset objects have the same time at GMT, there is no additional ordering of the objects based on the offset.