
## On (1 of 2) {#on_1}

Indicates that the date in message must be within the specified date.

**Returns:** MailQuery that represents search query (one searching criterion).

```cpp
On(System::DateTime value)
```

| Parameter | Description |
| --- | --- |
| value | The value. |

---

## On (2 of 2) {#on_2}

Indicates that the date in message must be within the specified date.

**Returns:** MailQuery that represents search query (one searching criterion).

```cpp
On(System::DateTime value, DateComparisonType comparisonType)
```

| Parameter | Description |
| --- | --- |
| value | The value. |
| comparisonType | Specifies a type of comparison |

