You are here: Record management > Building expressions with the Expression Builder > Expression evaluation > Comparison operators

Comparison operators

This table shows the valid combinations of types for comparison operators. To understand the calculation of the expression A > B, find the intersection of the row for A's type and the column for B's type. Consult the numbered notes for the details of casting or conversion.

The operator ~= evaluates using equalsIgnoreCase().

DateTime

Date

Time of Day

Integer

Decimal

Double

True or False

Other (text)

DateTime

1

3

X

3

3

3

X

X

Date

3

1

X

3

3

3

X

X

Time of Day

X

X

1

X

3

3

X

X

Integer

3

3

X

2

2

2

X

X

Decimal

3

3

3

2

2

2

X

X

Double

3

3

3

2

2

2

X

X

True or False

X

X

X

X

X

X

4

X

Other (text)

X

X

X

X

X

X

X

5

Legend:

X

A casting, promotion, or conversion is not supported. Pega Platform reports an error.

1

Permitted. Depending upon complexity of expression and intermediate conversions that may have occurred, use either the original ClipboardProperty String form or Java BigDecimal.

2

Permitted. Converts Integer > Double > Decimal until both operands have same type, then performs operation. (Convert directly to target type without performing additional intermediate conversions.)

3

Permitted. Converts to the preferred Java type (and if necessary, promote as described in note 2) and performs the operation.

4

Permitted. Converts to Java boolean and performs the operation.

5

Permitted. Evaluate using String.compareTo()

.

This is not locale-sensitive.