--- title: "Relative date range with time" slug: "core-date-range-value" updated: 2026-04-23T14:04:05Z published: 2026-04-23T14:04:05Z canonical: "docs.lobstersoftware.com/core-date-range-value" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Relative date range with time *See also:* [Date range type](/v1/docs/en/date-date-range-value-type) (Enumeration)*,* [Relative date with time](/v1/docs/en/core-date-time-value) (Value resolver) > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Returns a "Date range with time" calculated by predefined or user-defined *time calculation patterns* relative to the system time or the *input value* (only for "Custom"). > > > [!TIP] > > Tooltip > > > > - **Usage**: The value resolver calculates the return value in the common case relative to the *system time* (see also the note below) and only in connection with the "Custom" **Type** relative to the *input value*. For all other types, the input value is ignored. So, for example, to calculate the date range "Next week" relative to any input value, the **"**Custom" **Type** must be selected and e.g. the predefined *time calculation patterns* from the dynamic enumeration [Date range type](/v1/docs/en/date-date-range-value-type) must be combined for the **Custom start** and **Custom end** parameters. > > - **Parameter**: > > - A [Date range type](/v1/docs/en/date-date-range-value-type) must be selected for the **Type** parameter to use predefined *time calculation patterns* or to allow the input of custom *time calculation patterns* (as **Custom start** or **Custom end)**. > > - A **Time Zone** can be optionally selected. It will then be considered for the calculation as well as assigned to the return value. Without any selection, the time zone applicable in the context or (only for the custom **Type**) that of the date from the *input value* (if available) is used. > > - Individual *time calculation patterns* can be defined via the **Custom start** and **Custom end** parameters in connection with the "Custom" **Type**. For other types, these parameters are hidden. The section "Time calculation patterns" in the context help for the [Relative date with time](/v1/docs/en/core-date-time-value) value resolver defines details for the syntax and calculation logic. > > - **NOTE:** Depending on the execution context (e.g. event handling vs. client workflow), the *system time* of the server or client is taken into account. ![images/download/attachments/78256094/image2022-9-16_18-49-40-version-1-modificationdate-1663346981142-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-49-40-version-1-modificationdate-1663346981142-api-v2.png) The [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver provides a "Date range with time" that is determined relative to one of the following *reference times*, depending on the selected **Type:** - By default, the current *system time* is considered the *reference time* (with the same value for "From" and "To") for the "relative" calculation of the return value determined by the **Type**. **NOTE:** Depending on the execution context, either the system time of the server (see [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration)) or of the client (e.g. in a [Client Workflow](/v1/docs/en/frebehav-client-workflow)) can be the decisive factor. - The *input value* is only taken into account in connection with the "Custom" (`CUSTOM`) **Type** as the *reference time*, provided that it corresponds to one of the following data types: | Input value type | Class | Reference time | Time zone (from input value) | | --- | --- | --- | --- | | **"Date range with time"** | `core:DateRange` | "From" (`start`) – "To" (`end`) field | "Time zone" (timeZone) field is taken into account for the return value only if there is no selection for the **Time zone** parameter. | | **"Date with time"** | `core:DateTime` | "Date value" (dateValue) field *for "From" and "To"* | | **"Long"** | `java.lang.Long` | *Input value for "From" and "To"* | *n/a* | | **"Timestamp"** | `java.sql.Timestamp` | | **"Date"** | `java.util.Date` | The return value is determined depending on the selected **Type** (see [Date range type](/v1/docs/en/date-date-range-value-type)) starting from the *reference time* by a *time calculation pattern* for **Custom start** ("From" time) and **Custom end** ("To" time): | **Type** | Configuration example | Return value calculation | | --- | --- | --- | | **"Custom"** | ![images/download/attachments/78256094/image2022-9-16_18-52-35-version-1-modificationdate-1663347155109-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-52-35-version-1-modificationdate-1663347155109-api-v2.png) | The *time calculation patterns* defined in the **Custom start** and **Custom end** parameters are applied to the *reference* *time* (either suitable *input value* or the *system time*). In the example, starting from the *system time* or a suitable *input value*, the period that begins at 10:00 p.m. on the calendar day before the "From" date and ends at 6:00 a.m. on the calendar day following the "To" date is calculated. **IMPORTANT:** The time zone applicable for the return value is also decisive for the interpretation of the *time calculation patterns*. Since in the example (left) the **Time Zone** parameter does not specify a selection, the time zone is taken from the *input value* if one is specified (see table above). If there is a selection for the **Time Zone** parameter, then the respective time zone is used for the conversion instead and assigned to the return value. Effect of time zones on the interpretation in the **Custom time** value of the *time calculation pattern*. - The *input value* is a "Date with time", which refers to 12/20/2020 at 00:00 in the "Asia/Manila" time zone. - The sample configuration (without selection for the **Time** **zone**) returns the interval from 12/19/2020 at 22:00 to 12/21/2020 at 6:00 (in Manila) as the return value. - With "Europe/Berlin" in the **Time** **zone** parameter, the period from 12/18/20/20 at 22:00 to 12/20/20 at 6:00 (in Berlin) would be returned instead. This corresponds to the period from 12/19/2020 at 05:00 to 12/20/20 at 13:00 in Manila. The return value is therefore 17 hours before the original result (see above). - The *input value* is first converted to the Berlin time zone (12/19/2020 17:00). - The offsets for **Custom start** (`-1`) and **Custom end** (`+1d`) are applied "in Berlin time". After that the local time is set. | | **All other types** | ![images/download/attachments/78256094/image2022-9-16_18-53-14-version-1-modificationdate-1663347194471-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-53-14-version-1-modificationdate-1663347194471-api-v2.png) | The *time calculation pattern* stored for the selected **Type** in the [Date range type](/v1/docs/en/date-date-range-value-type) dynamic enumeration is applied to the current *system time* of the server or client. In the example, the end of the current calendar day (see [Date range type](/v1/docs/en/date-date-range-value-type), "Next day") in the **Time zone** "Europe/Lisbon" is returned. - The *time calculation patterns* for "Next day" are `0h 0m 0s 0S +1d` (for the "Custom start") and `23h 59m 59s 999S +1d` (for the "Custom end"). - Since "Europe/Lisbon" is selected as **Time zone**, the time period for the next calendar day in this time zone is output. This may be different from the calendar day that would be considered the "next day" in the time zone applicable without selection for the **Time zone** parameter. For example, when the system is in the "Europe/Berlin" time zone and displays the time 00:30. Then, from Berlin’s point of view, it is still "yesterday" in Lisbon. | ## Configuration **NOTE:** The *input value* is only considered in connection with the "Custom" (`CUSTOM`) **Type**. Then a "Date range with time" or a value that can be interpreted as a date must be present. | Parameter | Configuration | Description | | --- | --- | --- | | **Type** | ![images/download/attachments/78256094/image2022-9-16_18-53-47-version-1-modificationdate-1663347227941-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-53-47-version-1-modificationdate-1663347227941-api-v2.png) | The **Type** parameter allows static single selection of a value from the [Date range type](/v1/docs/en/date-date-range-value-type) dynamic enumeration. As shown in the image (left), the selection is supported by a search function. [Enumeration filters](/v1/docs/en/core-dynamic-enum-filter) can restrict the availability of options in the configuration context dropdown. They do not affect the runtime behaviour of the value resolver. **NOTE:** If no **Type** is selected, then the date range *system time* – *system time* is always returned. | | **Time zone** | ![images/download/attachments/78256094/image2022-9-16_18-54-36-version-1-modificationdate-1663347276340-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-54-36-version-1-modificationdate-1663347276340-api-v2.png) | The **Time zone** parameter optionally allows static single selection of a time zone supported by Java. As shown in the image (left), the selection is supported by a search function. The selection of a **Time zone** influences the interpretation of the *time calculation patterns* applied at runtime. The selected **Time zone** is also used for the return value. If no **Time zone** is selected, then generally the default time zone applicable in the context is used, defined (in descending priority) by one of the following settings: - "Default time zone" field in the user account of the logged in session. - "Default time zone" field in the company account of the logged in session. - Settings in the operating system relevant for the execution context (client/server). If there is an *input value* in connection with the "Custom" (`CUSTOM`) **Type** that explicitly includes a time zone, it is taken into account if no selection has been made for the **Time zone** parameter. **NOTE:** The selection options for time zones cannot be localized and they cannot be restricted by [Enumeration filters](/v1/docs/en/core-dynamic-enum-filter). The displayed texts originate directly from the Java environment. | | **Custom start** and **Custom end** | ![images/download/attachments/78256094/image2022-9-16_18-55-59-version-1-modificationdate-1663347359714-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-55-59-version-1-modificationdate-1663347359714-api-v2.png) | The **Custom start** and **Custom end** parameters support the input of a static text each, which is interpreted at runtime as a *time calculation pattern* (see [Relative date with time](/v1/docs/en/core-date-time-value), the section "*Time calculation patterns*" for details). **NOTE:** These parameters only appear if the "Custom" (`CUSTOM`) **Type** is selected. For all other types, suitable *time calculation patterns* for "Start" and "End" should be stored in the [Date range type](/v1/docs/en/date-date-range-value-type) dynamic enumeration. Custom types with specific *time calculation patterns* can also be added there. In the example, the **Custom start** refers to the beginning of a calendar day in the **Time zone** "Asia/Tokyo", which is determined either by the *system time*, the *input value* or the "From" field contained therein, depending on the *reference* *time*. The **Custom end** is determined as the beginning of the quarter in the same **Time zone** that starts after the end of the *reference time* (determined by *system time*, *input value* or "To" field contained therein). If no *time calculation pattern* is specified as **Custom start** or **Custom end** , then the corresponding component from the *reference time* is output, if necessary, taking into account the selected **Time zone**. | ## Examples ### Simple use case: Delimiting a search by a relative date range In an overview for [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) it is easy to find out which of the displayed [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) were last modified yesterday by using filters or sorting for the column "Last modified" (`lastModified`). Runtime example: ![images/download/attachments/78256094/image2022-9-16_19-0-30-version-1-modificationdate-1663347630707-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_19-0-30-version-1-modificationdate-1663347630707-api-v2.png) - In the dropdown for filtering for the "Last modified" column, the "Date range types" defined via the dynamic enumeration [Date range type](/v1/docs/en/date-date-range-value-type) appear for selection, because this is how it is intended for the data type of the column (Timestamp). - In the image, "Previous day" has been selected, so that the list will only list [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) as rows whose "Last modified" date is in the date range that is considered "Yesterday" by the current *system time*. The definition for the relative date range "Previous day" (`YESTERDAY`) predefined by the system is now also used to set up a row formatting for the overview, which shades all rows with "modified yesterday" [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) yellow. Configuration: | The screenshot on the right shows the **Row formatter** configuration added within the existing data grid settings for the [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) context: - The row formatting has been assigned the **Format** **name "**MODIFIED_YESTERDAY". - The only **Condition** here is a field restriction for the "Last modified" (`lastModifiied`) field, which is accessed by a [Property projection](/v1/docs/en/core-property-projection) on the left. - For the comparison value on the right side of the [Field restriction](/v1/docs/en/core-property-search), the [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver is used: - As **Type** – similar to the interactively set filter in the runtime example above – "Previous day" (`YESTERDAY`) is selected here. - A **Time zone** is not specified. - The decisive factor is the selection of the comparison operator `between`, which enables the comparison between the time (left side) and the period (right side). Effectively, the **Format settings** of the **Row Formatter** "MODIFIED_YESTERDAY" are considered to be assigned exactly to the rows that are recognized as "modified yesterday", because the "Last modified" is in the relative date range "Previous day" (with reference to the current *system time*) | ![images/download/attachments/78256094/image2022-9-16_19-1-35-version-1-modificationdate-1663347695880-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_19-1-35-version-1-modificationdate-1663347695880-api-v2.png) | | --- | --- | | **NOTE:** Corresponding restrictions can also be used to define a search for an [Import](/v1/docs/en/orchestration-integration-import) profile in Lobster_data. The XML structure on the right shows how easy it is to access predefined date ranges (here: `YESTERDAY`) via the `DateRangeValue` object (here as the `value` element of a [Field restriction](/v1/docs/en/core-property-search)) within a [Search](/v1/docs/en/core-search). | ```plaintext between ``` | ### Use case: Defining the appointment confirmation "Almost there!" If a shipment is assigned the working state "Almost there!" (`ON_FINAL`) a `deliverySlot` variable should be assigned a date range object that starts immediately – i.e. with the current system time – and ends 15 minutes later. Configuration: | Within an event handler, a [Set value](/v1/docs/en/core-set-value-actor) event action is configured as shown on the right: - On the left side, a [Variable](/v1/docs/en/core-storage-value) `deliverySlot` is determined as the target of the assignment, in which the calculated "Date range with time" is held before other event actions are executed. - On the right, a [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver is used to calculate date range starting from the *system time* (assumption: the *input value* in the context is not a date range or time) to quantify the commitment "Almost there!": - Since no *time calculation pattern* was specified for the **Custom start**, the *system time* is set. - The **Custom end** is determined by an offset of 15 minutes (`+15`), which is calculated taking into account the seconds and milliseconds relative to the *system time*. - The selection of the **Time zone** has no influence on the calculation here. However, it is explicitly assigned to the "Date range with time" in the return value. | ![images/download/attachments/78256094/image2022-9-16_18-57-37-version-1-modificationdate-1663347457659-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-57-37-version-1-modificationdate-1663347457659-api-v2.png) | | --- | --- | In the next step, the configuration is optimized so that the date range for the `deliverySlot` is no longer calculated relative to the *system time*, but relative to the "Date with time" value in the "Realization time" (`realization`) field for the relevant working state entry. | The existing configuration is adapted for this purpose as shown on the right: - The left side can be taken over unchanged. The target of the assignment is again the `deliverySlot` variable. - On the right side, an *input value* for the [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver is obtained by concatenation above it. Since the value resolver is executed with the working state of the shipment (from the `currentWorkingstate` field; not shown in the image) as the *reference object*, its "Realization time" (`realization`) field can be accessed directly via an [Object property](/v1/docs/en/core-property-resolver) value resolver. - The parameters for the [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver can be kept unchanged, since the "Realization time" is the *input value* for the **Custom start** and the **Custom end** is the "Reference time". **NOTE:** If no "Realization time" is specified for the working state entry when adding a working state, **Lobster Data Platform/Orchestration** automatically assigns the current *system time* as the "Realization time". Therefore, this field should never be empty for a working state entry when event handling is triggered when setting a working state (see [Working state (Events)](/v1/docs/en/base-working-state)). In general, however, it must be taken into account that a [Relative date range with time](/v1/docs/en/core-date-range-value) value resolver with the "Custom" **Type** will fall back to the *system time* if the *input value* is empty or just unsuitable by type. | ![images/download/attachments/78256094/image2022-9-16_18-58-37-version-1-modificationdate-1663347517447-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-16_18-58-37-version-1-modificationdate-1663347517447-api-v2.png) | | --- | --- |