Comparison

Following are Comparison operators. You can go into them to get detailed information.

x > y

date x > date y

If x is greater than y, the return value will be true. If x is < and == y, the return value will be false.

Example

The return value of the following statement is true.

ToDate(1999, 10, 10) > ToDate(1999, 2, 5)

datetime x > datetime y

If x is greater than y, the return value will be true. If x is < and == y, the return value will be false.

Example

The return value of the following statement is true.

ToDateTime(1999, 10, 10, 10, 10, 10) > ToDateTime(1999, 5, 10, 8, 5, 5)

numeric x > numeric y

If x is greater than y, the return value will be true. If x is < and == y, the return value will be false.

Examples

string x > string y

If x is greater than y, the return value will be true. If x is < and == y, the return value will be false.

Examples

time x > time y

If x is greater than y, the return value will be true. If x is < and == y, the return value will be false.

Example

The return value of the following statement is true.

ToTime(10, 10, 10) > ToTime(8, 10, 10)

x < y

date x < date y

If x is less than y, the return value will be true. If x is > and == y, the return value will be false.

Example

The return value of the following statement is false.

ToDate(1999, 10, 10) < ToDate(1999, 2, 5)

datetime < datetime y

If x is less than y, the return value will be true. If x is > and == y, the return value will be false.

Example

The return value of the following statement is false.

ToDateTime(1999, 10, 10, 10, 10, 10) < ToDateTime(1999, 5, 10, 8, 5, 5)

numeric x < numeric y

If x is less than y, the return value will be true. If x is > and == y, the return value will be false.

Examples

string x < string y

If x is less than y, the return value will be true. If x is > and == y, the return value will be false.

Examples

time x < time y

If x is less than y, the return value will be true. If x is > and == y, the return value will be false.

Example

The return value of the following statement is false.

ToTime(10, 10, 10) < ToTime(8, 10, 10)

x == y

date x == date y

If x is equal to y, the return value is true. If x is not equal to y, the return value will be false.

Example

The return value of the following statement is false.

ToDate(1999, 10, 10) == ToDate(1999, 5, 10)

datetime == datetime y

If x is equal to y, the return value will be true. If x is not equal to y, the return value will be false.

Example

The return value of the following statement is false.

ToDateTime(1999, 10, 10, 5, 10, 10) == ToDateTime(1999,10, 10, 10, 10, 10)

numeric x == numeric y

If x is equal to y, the return value will be true. If x is not equal to y, the return value will be false.

Example

The return value of the following statement is false.

5==4

string x == string y

If x is equal to y, the return value is true. If x is not equal to y, the return value will be false.

Example

The return value of the following statement is false.

"string abcd" == "string abc"

time x ==  time y

If x is equal to y, the return value will be true. If x is not equal to y, the return value will be false.

Example

The return value of the following statement is false.

ToTime(9, 10, 10) == ToTime(10, 10, 10)

x <> y or x != y

date x <> date y   or date x != date y

If x is not equal to y, the return value will be true. If x is equal to y, the return value will be false.

Example

The return value of the following statement is true.

ToDate(1999, 10, 10) != ToDate(1999, 5, 10)

datetime x <> datetime y or datetime x != datetime y

If x is not equal to y, the return value will be true. If x is equal to y, the return value will be false.

Example

The return value of the following statement is true.

ToDateTime(1999, 10, 10, 5, 10, 10) != ToDateTime(1999,10, 10, 10, 10, 10)

numeric x <> numeric y or numeric x != numeric y

If x is not equal to y, the return value will be true. If x is equal to y, the return value will be false.

Example

The return value of the following statement is false.

4 <> 4

string x <> string y or string x != string y

If x is not equal to y, the return value will be true. If x is equal to y, the return value will be false.

Example

The return value of the following statement is true.

"string abc" != "string abcd"

time x <> time y or time x != time y

If x is not equal to y, the return value will be true. If x is equal to y, the return value will be false.

Example

The return value of the following statement is true.

ToTime(9, 10, 10) <> ToTime(10, 10, 10)