Coveo Enterprise Search Online Help
How to Query Date and Time Fields

Glossary Item Box

Date and time fields are queried using relative or static values. Relative values are dependent on a date operator (e.g. today) and time reference (e.g. 8h ago); whereas, static values are fixed dates (e.g. 2007 /08/09@09:21:01).

To query a date and time field with a relative value, use the following syntax @fieldname=dateoperator+timereference. For a description of these components, refer to the following table:

Field names

Relational Operators

Date Operators

Mathematical Operators

Time References(optional with today and yesterday)

Possible values

All fields whose type is Date/time.

For more information, refer to List of System Fields

=, <>, >, >=, <, <=

For more information, refer to What Search Operators Can Be Used in CES?

now, today, yesterday

For more information, refer to What Search Operators Can Be Used in CES?

+, -

For more information, refer to What Search Operators Can Be Used in CES?

All numbers and decimals (the decimal symbol is a dot not a comma).

Note: Time units are seconds (s), minutes (m), hours (h), days (d), months (mo) and years (y).

Example

@sysdate

>

yesterday

+

12h

To query a date and time field with a static value, use the following syntax @fieldname=yyyy/mm/dd@hh:mm:ss. Note that years are four-digit values (e.g. 2007), months two-digit values (e.g. 04 or 12), days two-digit values (e.g. 01 or 31) and hours range from 00 to 24 (AM or PM symbols are not allowed).