> 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="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FqkYMPw0vZBhVOPYOaZQL%2FScreenshot%202024-04-03%20at%2014.11.46.png?alt=media&amp;token=a408833a-374a-42ef-8858-3e44c4560c5e" 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="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FTIoIxfYubAOVsmI8dLIY%2FScreenshot%202024-04-03%20at%2014.13.09.png?alt=media&amp;token=27ed3062-1fd1-4cc6-b476-a0166945d412" 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="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2F0WELnvqZUV3OnFKCFugz%2FScreenshot%202024-04-03%20at%2014.15.41.png?alt=media&amp;token=8ef36bd1-8cdc-462c-a752-c8de5475439d" alt=""><figcaption></figcaption></figure>
