Plumtree EDK (Enterprise Web Development Kit) 5.4.0 |

# IFilterClause.AddStatement Method (Field, Operator, DateTime)

Adds a `DateTime` constraint to this clause.

void AddStatement(
Field field,
Operator op,
DateTime value
);

#### Parameters

field
  `Field` to search. Field must return `DateTime` values, e.g. `PlumtreeField.LAST_MODIFIED` Adding a field of the wrong type may cause an exception on the search server.
op
  constraint operator, e.g. `Operator.Equals` or `Operator.GreaterThan`
value
  `DateTime` value to evaluate. Note that `DateTime`s in the search server are only accurate to within four minutes, so `Operator.Equals` is discouraged. Using `GreaterThan/LessThan` or a date range is the recommended usage. `DateTime`s in the search server should remain sequential as they are indexed, although roundoff may result in two dates that were sequential on input being the same in the search server.

#### Remarks

The field must be searchable.

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentException | if field is not searchable

#### See Also

IFilterClause Interface | Plumtree.Remote.PRC.Search Namespace | IFilterClause.AddStatement Overload List