Field Text Date Formats
The data formats that can be used as part of the field_text and other parameters.

Date Formats for Parameters

The following table lists the date formats that you can use to specify dates for the date Field Text Operators and the date parameters in various APIs.

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 February 1st 2001, while 01/03/40 is read as March 1st 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 February 1st 2001, while 01/03/40 is read as March 1st 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.

All parts of the timestamp are required (for example, if you do not know the time, set it to 00:00:00). 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 January first 1970).

For example, 1012345000e specifies 22:56:40 on January 29th 2002.

Note: The date formats here do not exactly match all the date formats that might exist in documents in the text indexes. When you search for a date in a particular format, Haven OnDemand returns matches according to the date, not the exact format. For more information about the date formats that exist in document date fields, see Index Field Types

Note: Haven OnDemand text indexes treat any date that does not have explicit timezone information as a date in UTC, both in the index and in your query parameters. If you use query dates and times in your local timezone, this behavior might result in non-intuitive matches.

For example, if you index the date 03:56:40 29/01/2002 without timezone information, Haven OnDemand treats this as 03:56:40 on 29 January 2002 UTC. If your local timezone is GMT-6, 03:56:40 29/01/2002 in your local time corresponds to 22:56:40 on 29 January 2002 UTC, or 1012345000e in epoch seconds. However, because the date was indexed as UTC, a search for 1012345000e does not match the 03:56:40 29/01/2002 date.

Date Formats for Connector Schedules

You can set up your Haven OnDemand Connectors to run on a schedule. The start_date and end_date schedule parameters for Cloud flavor connectors accept a date in the formats listed in the previous section. For any of the date and time formats (not N, Ns, or Ne), you can also specify a timezone as +HHMM or +HH:MM.

For example:

"start_date": "28/09/2016 11:30:00 +01:00"

If you do not specify a timezone, the Connector treats the dates and times as UTC.