> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
