Open topic with navigation

# RANGE

The `RANGE` field specifier (case sensitive) allows you to find documents in which a specified field contains a date that falls in the inclusive range of two dates specified by you.

Note: You can optimize the field specifier speed by restricting the field to the NumericDateType property type.

## Format

    FieldText=RANGE{yourDates}:yourFields

`yourDates` | Type two dates, separated by a comma (there must be no space before or after the comma). A document returns only if one of `yourFields` contains a date that falls within the inclusive time span specified by the specified dates. By default, the range is inclusive. You can use the greater than (<) and less than (>) symbols to specify an exclusive range. You can make either or both ends of the range exclusive.
`yourFields` | Type one or more fields. A document returns only if it contains one of these fields, and if this field contains a date that falls within the inclusive range of `yourDates`. Separate multiple fields with colons (`:`). There must be no space before or after a colon.

You can use the following formats to specify your dates:

Date formats

Format | Explanation
--- | ---
`D+/M+/#YY+` | A date. For example, `1/3/05`, `23/12/1999`, `10/07/40`, or `8/5/2012`. If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, `01/02/01` is read as 1 February 2001, and `01/03/40` is read as 1 March 1940. IDOL Server treats the date as a date in its local timezone.
`HH:NN:SS D+/M+/#YY+` | A time and date. For example, `10:30:45 1/3/05`, `18:55:00 23/12/99`, `01:23:45 10/07/1940`, or `07:15:00 8/5/2012`. If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, `01/02/01` is read as 1 February 2001, and `01/03/40` is read as 1 March 1940. IDOL Server treats the date as a date in its local timezone.
`HH:NN:SS D+/M+/#YY+ #ADBC` | A time and date with a time period. For example, `10:30:45 1/3/05 AD`, `18:55:00 23/12/99 CE`. For the time period, you can use `AD`, `CE`, `BC`, `BCE`, or any predefined list of EPOCH indicators. IDOL Server treats the date as a date in its local timezone.
`N` | A positive or negative number of days from the current date. For example, `–1` specifies yesterday's date, `0` specifies today's date, `1` specifies tomorrow's date, `2` specifies two days from now (the current date plus two), and so on.
`Ns` | A positive or negative number of seconds from now. For example, `–60s` specifies one minute ago, `–900s` specifies 15 minutes ago, `–3600s` specifies one hour ago and so on. `60s` specifies one minute from now, `900s` specifies 15 minutes from now, `3600s` specifies one hour from now, and so on.
`Ne` | Epoch seconds (seconds since 1 January 1970 UTC). For example, `1012345000e` specifies 22:56:40 on 29 January 2002 UTC.

Note: IDOL Server treats any date that does not have explicit timezone information as a date in the local timezone, both in the index and in your query parameters. This behavior might result in non-intuitive matches.

For example, epoch second values are always UTC. The value `1012345000e` matches times as 22:56:40 on 29 January 2002 UTC. If your local timezone is GMT-6, this query might match an indexed date value of 03:56:40 on 29 January 2002 (which corresponds to the same time UTC), because the indexed date is in your local timezone.

Similarly, if your query date is `03:56:40 29/01/2002`, this might match an indexed epoch seconds date of `1012345000`.

You can specify an open-ended range by using a period (`.`):

- If you type a period for the first point in time, the beginning of the time period is not restricted (so the period ranges up to the specified date, including any date before the specified date).

- If you type a period for the second point in time, the end of the time period is not restricted (so the period ranges from the specified date, including any date after the specified date).

## Example

    FieldText=RANGE{01/01/90,1/1/01}:DATE

A document's `DATE` field must contain a date between 01/01/1990 and 1/1/2001 for this document to be returned.

    FieldText=RANGE{01/01/02,01/01/2003}:DATE:DATUM

A document's `DATE` or `DATUM` field must contain a date between 01/01/2002 and 01/01/2003 for this document to be returned.

    FieldText=RANGE{-14,-7}:DATE

A document's `DATE` field must contain a date 14 to 7 days before the current date for this document to be returned.

    FieldText=RANGE{0,1}:DATE

A document's `DATE` field must contain today's or tomorrow's date (which is possible, for example, if the document originates from a different time zone or if the field contains an expiry date) for this document to be returned.

    FieldText=RANGE{01/01/99,.}:DATE:FECHA

A document's `DATE` or `FECHA` field can contain any date after 01/01/1999 for this document to be returned.

    FieldText=RANGE{.,10/10/04}:DATE

A document's `DATE` field can contain any date before 10/10/2004 for this document to be returned.

    FieldText=RANGE{-172800s,-1}:DATE

A document's `DATE` field must contain a time between 48 and 24 hours ago.

    FieldText=RANGE{198765e,.}:DATE

A document's `DATE` field must contain a date between 198765 seconds after the epoch and the current time.

    FieldText=RANGE{>05/06/2013,05/06/2014}:DATE

A document's `DATE` field must contain a date after 05/06/2013, up to and including 05/06/2014.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm