# Business Days

Demonstrates how to calulcate business / working days. Please check with Omfax Systems support before following this guide as this example below relies on...

* The `syHolidays` table being populated with all public holidays
* The SQL function `fn_DueDate` being present (possibly not the case in older Keyfax versions)&#x20;

Two script steps demonstrate this; the first asks for the number of business days and stores it in a Databox named Script.Business Days:

<figure><img src="/files/cpgvkHGVU97fclCE8CCg" alt=""><figcaption><p>Example script demonstrating Business Days calculation</p></figcaption></figure>

This [SQL Query](/product-suite/admin/entities/databoxes/sql-query.md) Databox executes the function `fn_DueDate`, supplying the Databox above and a country code (**EN**gland). The expression **PlusBusinessDays** is the one of interest:&#x20;

<div align="left"><figure><img src="/files/7NpOXVtgI0KT29B152zP" alt=""><figcaption><p>SQL Databox</p></figcaption></figure></div>

This Message references both Databoxes:

<div align="center"><figure><img src="/files/T0iIjIZPZRvZl5mejzEC" alt=""><figcaption><p>Message to display the results</p></figcaption></figure></div>

For example...

<figure><img src="/files/3DghILU5YsqFHRimq746" alt=""><figcaption><p>The results as seen by the end-user</p></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.keyfax.biz/product-suite/admin/databox-examples/business-days.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.
