IDOL Server 12.13

# Fields that Contain a Date

You can use the following field specifiers (case sensitive) to return documents with fields that contain dates.

NOTE: To optimize the processing time of queries for fields that contain dates, store them as numeric date fields in the IDOL Content component during the indexing process.

Related Topics

- NumericDateType Fields

## GTNOW

The `GTNOW` field specifier (case sensitive) allows you to find documents in which a specified field contains a date that is greater than the `AUTNDATE` (that is, all documents that were indexed with dates after the current time).

    FieldText=GTNOW{}:yourFields

where:

`yourFields` | is one or more fields. A document returns only if it contains one of these fields, and if this field contains a date that is greater than the `AUTNDATE` (that is, all documents that were indexed with dates after the current time). To specify multiple fields, separate them with colons (there must be no space before or after a colon).

Examples:

    FieldText=GTNOW{}:TIME

The `TIME` field must contain a date that is greater than the `AUTNDATE` (that is, all documents that were indexed with dates after the current time) for the document to return.

    FieldText=GTNOW{}:TIME:DATE

The `TIME` or `DATE` field must contain a date that is greater than the current time (that is, all documents that were indexed with dates after the current time) for the document to return.

## LTNOW

The `LTNOW` field specifier (case sensitive) allows you to find documents in which a specified field contains a date that is smaller than the `AUTNDATE` (that is, all documents that were indexed with dates before the current time).

    FieldText=LTNOW{}:yourFields

where:

`yourFields` | is one or more fields. A document returns only if it contains one of these fields, and if this field contains a date that is smaller than the current time. To specify multiple fields, separate them with colons (there must be no space before or after a colon).

Examples:

    FieldText=LTNOW{}:*/TIME

The `TIME` field must contain a date that is smaller than the `AUTNDATE` (that is, all documents that were indexed with dates before the current time) for the document to return.

    FieldText=LTNOW{}:TIME:DATE

The `TIME` or `DATE` field must contain a date that is smaller than the `AUTNDATE` (that is, all documents that were indexed with dates before the current time) for the document to return.

## RANGE

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

    FieldText=RANGE{yourDates}:yourFields

where:

`yourDates` | is 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 of the specified dates. You can use the formats in the table below to specify each date. 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` | is 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`. To specify multiple fields, separate them 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.
`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.
`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.
`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). For example, `1012345000e` specifies 22:56:40 on 29 January 2002. NOTE: Content uses the local time zone to match epoch values. For example, if your local time zone is GMT-6, `1012345000e` is 03:56:40 on 29 January 2002. If you use this value as the beginning of a range, Content retrieves documents after 03:56:40 on 29 January 2002.

For `RANGE`, 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 (the period ranges up to the specified date, including any earlier date).

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

Examples:

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

The `DATE` field must contain a date between 01/01/1990 and 1/1/2001 for the document to return.

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

The `DATE` or `DATUM` field must contain a date between 01/01/2002 and 01/01/2003 for the document to return.

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

The `DATE` field must contain a date 14 to 7 days before the current date for the document to return.

    FieldText=RANGE{0,1}:DATE

The `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 expiration date) for the document to return.

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

The `DATE` or `FECHA` field can contain any date after 01/01/1999 for the document to return.

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

The `DATE` field can contain any date before 10/10/2004 for the document to return.

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

The `DATE` field must contain a time between 48 and 24 hours ago.

    FieldText=RANGE{198765e,.}:DATE

The `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

The `DATE` field must contain a date after 05/06/2013, up to and including 05/06/2014.

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Server 12.13

Topic Title: Fields that Contain a Date