# Before (Date) & After (Date)

This condition checks if a calendar date is smaller or greater than a comparison date.

#### Days shift

This is a shift added to the date that you enter in the field *Enter days shift*. It can be a positive or negative number.

#### Example: 3 days shift

Image that you entered the comparison date as 10th of July and 3 days shift, as shown below:

<figure><img src="/files/zOd3t5YQAJpGbhxayGrI" alt=""><figcaption></figcaption></figure>

This set-up will convert the comparison date from 10th of July to 13th of July (07/13/2023).

**On&#x20;*****After*****:** The condition will be met if the reference date (the one entered in *Start Condition* building block) is 14th or any day after 14th, which is later than 13th.

**On&#x20;*****Before*****:** The condition will be met if the reference date (the one entered in *Start Condition* building block) is 12th or any day before 12th, which is earlier than 13th.

#### Example: -2 days shift

Negative numbers are accepted, too.&#x20;

<figure><img src="/files/epUBafNDCLhtfHSf7bfW" alt=""><figcaption></figcaption></figure>

This set-up will convert the comparison date from 10th of July to 8th of July (07/08/2023).

**On&#x20;*****After*****:** The condition will be met if the reference date (the one entered in *Start Condition* building block) is 9th or any day after 9th, which is later than 8th.

**On&#x20;*****Before*****:** The condition will be met if the reference date (the one entered in *Start Condition* building block) is 7th or any day before 7th, which is earlier than 8th.

#### Date format

The date format between the comparison date and the reference date must be consistent, otherwise the comparison would be error-prone.

You can change the date format in the date settings as shown below.&#x20;

<figure><img src="/files/0MtaShDGQrWGjvhM4cMw" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
