# After

Use the `After` expression to determine if the date is after the specified date. Any time part of the date is ignored.&#x20;

<table data-full-width="false"><thead><tr><th>Expression</th><th align="center">Databox Value</th><th align="center">Result</th><th>Comments</th></tr></thead><tbody><tr><td><code>After("14-10-2010")</code></td><td align="center">15-10-2010 08:00pm</td><td align="center">True</td><td>Any time part of the date is ignored</td></tr><tr><td><code>After(DateAdd(Today,-1,'yyyy'))</code></td><td align="center">15-10-2020 08:00pm</td><td align="center">True</td><td>This checks if the date falls within the last year. Note, this only expects date values to be present in the Databox and will automatically convert date strings with no need for an AsDate qualifier.</td></tr></tbody></table>

### Example 1

Compare two fixed values using [company-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/company-data "mention") and [script-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/script-data "mention")Databoxes.&#x20;

Read **CompanyData.Expressions.Date (15-10-2016)** and write into Examples.Date\
Run expression **Examples.Date.After 14-10-2016** to check if it is after 14-10-2016\
Display message.

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Ft1A5LSTSA1RF4znDXOw2%2Fimage.png?alt=media&#x26;token=3af8c05d-f1e7-4118-990f-8b32ddcdbab2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2F5o4GVSUCav1hCTi6Qkjk%2Fimage.png?alt=media&#x26;token=501e0ed7-292d-4761-be13-2960272835cd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FtdBMIw6w2bqzpqbozibT%2Fimage.png?alt=media&#x26;token=cebbaf2d-78dd-4993-bb3f-4dc364bf28a6" alt=""><figcaption></figcaption></figure>

### **Example 2**

Compare a fixed value using a [company-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/company-data "mention") Databox against a user entered date in a [script-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/script-data "mention") Databox.

User enters date and writes it into Script.Date01\
Read **CompanyData.Expressions.Date (15-10-2016)** and write into **Examples.Date**\
Run expression **Examples.Date.After Date01** to check if 15-10-2016 is after the user entered date

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2F4j7AGCkw5raqhvVY38zw%2Fimage.png?alt=media&#x26;token=f55bb5c2-a49a-4607-84db-73dd3a3afaaf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2F5nHr9ncZz8uhSaYCer5p%2Fimage.png?alt=media&#x26;token=72581a40-1ca5-4afc-833a-1bbdc42d6453" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Fp7V3UtRaUdswFh9C5xM2%2Fimage.png?alt=media&#x26;token=92f2eb16-dec6-46e1-b111-2b4900989572" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FKzKyNMKGoJYfKYqISOww%2Fimage.png?alt=media&#x26;token=0aea9e1d-303a-4620-ac57-347b006ae04d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Fplkn5Uh42u5hgvRTfamP%2Fimage.png?alt=media&#x26;token=8fe004f5-522b-4700-b99a-8f7b3974df44" alt=""><figcaption></figcaption></figure>

### **Example 3**

Compare two user entered dates in [script-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/script-data "mention")Databoxes.

User enters date and writes it into **Script.Date01**\
User enters date and writes it into **Script.Date02**\
**Script.Date02** is written into **Examples.Date**\
Run expression **Examples.Date.After Date01** check if **Script.Date02** is after **Script.Date01**

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FksiPvidSZs6AN64H93Yi%2Fimage.png?alt=media&#x26;token=1d30f40e-1fe1-438c-883c-fbfc3e9be00f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Fpu6plnEUtq8lSGbiQjB0%2Fimage.png?alt=media&#x26;token=ea1f7a15-2930-4e72-a753-8e774194fca6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FgTbm988e90VEt0LmudfD%2Fimage.png?alt=media&#x26;token=1e880fe2-5eac-4a64-9b54-32a25e5a2162" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FjZlMt1M5Lut0LbndBVPO%2Fimage.png?alt=media&#x26;token=4990b59c-55e1-437b-b056-f2864d3afdd9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FhA7kiUi69WxI7iELhtZW%2Fimage.png?alt=media&#x26;token=288f66b3-68da-4551-84cf-1fdffdd6f7bd" alt=""><figcaption></figcaption></figure>

### Example 4

Compare today's date against a user entered date in a [script-data](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/script-data "mention") Databox.&#x20;

User enters date into **Script.Date01**\
Run expression **SystemValue.DateChecks.After** to see if today is after the user entered date

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2F021StkNnlIIBohrQ9bIN%2Fimage.png?alt=media&#x26;token=d6d7594d-7c34-488d-8378-ee67a1220061" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FLtVzVDF6vNU8IJnPjBVZ%2Fimage.png?alt=media&#x26;token=81f05e4c-44d2-4cf5-8e43-f06f2484bcad" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FtzqxhGkOIQssj1ndhdTO%2Fimage.png?alt=media&#x26;token=ce110bd0-c0ef-46f1-8b03-ff290441a463" alt=""><figcaption></figcaption></figure>
