# Date-Time-Datetime

The utilization of the three date and time types necessitates specific guidelines for determining when they should be assigned a dedicated value through the 'Default value' field in the Metadata menu.

An incorrect setting may result in an 'Invalid Date' error.

{% hint style="warning" %}
It is crucial that the Pre-Resolve checkbox for the designated metadata value is enabled.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/JazOaknIWynmzOb8kuKL/blobs/o8PuB0s7P0IwdXeQaOLp/image.png" alt=""><figcaption><p>Default value: date, time &#x26; datetime</p></figcaption></figure>

### DATE

Setting metadata for a date is straightforward.

For example: Date - 2024-09-02

* Default value: +0
  * Today -> 2024-09-02<br>
* Default value: +1
  * Tomorrow -> 2024-09-03<br>
* Default value: -1
  * Yesterday -> 2024-09-01<br>
* Default value: +10
  * -> 2024-09-12

In addition to using the symbols + or - with an integer for inputting dates, you can also use the YYYY-MM-DD pattern or the wildcards [{date.year}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-year-1)-[{date.month}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-month-1)-[{date.day}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-day-1).

The input dialogue for configuring or modifying the metadata field appears as follows:

<figure><img src="https://content.gitbook.com/content/JazOaknIWynmzOb8kuKL/blobs/vrMkMEviekHC0rIxRU8B/image.png" alt="" width="375"><figcaption><p>Set date in metadata</p></figcaption></figure>

### TIME

Setting the time can be achieved by inputting the time in the following pattern: HH:mm or by using the wildcards [{time.hour}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/time-hour):[{time.minute}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/time-minute).

Please note that seconds cannot be used with this metadata type.

For example: current time - 12:23

* Default value: {time.hour}:{time.minute}
  * -> 12:23

The input dialogue for configuring or modifying the metadata field appears as follows:

<figure><img src="https://content.gitbook.com/content/JazOaknIWynmzOb8kuKL/blobs/5ps5yiVeotkk2eVVcCXC/image.png" alt="" width="375"><figcaption><p>Set time in metadata</p></figcaption></figure>

### DATETIME

Datetime is a combination of date and time. Setting the metadata can be done manually by using a string with this pattern: YYYY-MM-DD HH:mm

It is possible to set this as well with dedicated wildcards:

[{date.year}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-year-1)-[{date.month}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-month-1)-[{date.day}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-day-1) [{time.hour}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/time-hour):[{time.minute}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/time-minute)

For example: current date & time - 2024-01-09 12:23

* Default value: {date.year}-{date.month}-{date.day} {time.hour}:{time.minute}
  * -> 2024-01-09 12:23

It is possible to use contextual date wildcards as well, for further information refer to

* [{date.year.?}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-year)
* [{date.month.?}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-month)
* [{date.day.?}](https://docs.helmut.de/helmut4-releases/v4.9.0/helmut4-components/streamdesigner/wildcards/date-and-time-21/date-day)

{% hint style="info" %}
Please ensure strict adherence to the pre-defined syntax when assigning a default value.
{% endhint %}
