Default Date/Time Parsers

  • reference
    +
    Use a date/time parser to tell the Search Service how to interpret date and time data in your documents.

    You can use one of the default date/time parsers, or create your own.

    Set the default date/time parser for your Search index from the Server Web Console’s' Advanced Settings or your JSON Search index definition.

    You can also set a date/time parser when using Date Range facets or a date range query.

    The following default date/time parsers are available:

    Date/Time Parser Description

    dateTimeOptional

    The dateTimeOptional date/time parser uses 6 layouts, in percentStyle format, to parse date and time strings.

    unix_micro

    The unix_micro date/time parser expects a date and time string represented as the number of microseconds since the Unix epoch (1970-01-01T00:00:00Z).

    unix_milli

    The unix_milli date/time parser expects a date and time string represented as the number of milliseconds since the Unix epoch (1970-01-01T00:00:00Z).

    unix_nano

    The unix_nano date/time parser expects a date and time string represented as the number of nanoseconds since the Unix epoch (1970-01-01T00:00:00Z).

    unix_sec

    The unix_sec date/time parser expects a date and time string represented as the number of seconds since the Unix epoch (1970-01-01T00:00:00Z).

    dateTimeOptional Layouts

    The following layouts are included in the dateTimeOptional date/time parser:

    Layout Example Date/Time String

    %Y-%m-%dT%H:%M:%S.%N%z:M

    2023-09-15T14:24:50.1567+05:30

    %Y-%m-%dT%H:%M:%S%z:M

    2023-09-15T14:24:50+05:30

    %Y-%m-%dT%H:%M:%S

    2023-09-15T14:24:50

    %Y-%m-%d %H:%M:%S

    2023-09-15 14:24:50

    %Y-%m-%d %H:%M:%S %z

    2023-09-15 14:24:50 +0530

    %Y-%m-%d

    2023-09-15

    Defaults for Missing Date/Time Values

    If a date/time string is missing a value, the Search Service uses the following default values to make a complete date/time string:

    Value Default

    Month

    01/January

    Day

    01

    Hour

    00

    Minute

    00

    Second

    00

    Timezone

    UTC

    Timezone Offset from UTC

    +00:00

    Fraction of a second

    nil