# Date Calculation

Date calculations are added in SuperTables 5.4.0. They allow you to do powerful calculations based on date fields and number fields. You can calculate with either dates and/or numbers combined.

Examples:

```
DATE(Order Date) - DATE(Delivery Date)
```

Or when using a number:

```
DATE(Order Date) + (SUM(Nr of Shipping Days) * DAY())
```

Numbers are by default in seconds. Therefore we added multiple helpers:![](https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/pTAiVRPKGj4dUi5ZnaOy/Scherm%C2%ADafbeelding%202025-04-30%20om%2010.39.44.png)

#### Step 1: Open Configuration&#x20;

{% tabs %}
{% tab title="Dashboard extension" %}
Click on the container that has SuperTables running. This will display an arrow that you can click to open a menu. Upon opening the menu, click the 'Configure...' option to open the configuration panel for SuperTables.

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/JzxeG4VLn2zclaR8qB75/Screenshot%202024-07-26%20at%2010.19.27.png" alt=""><figcaption><p>Opening configuration panel in Dashboard </p></figcaption></figure>
{% endtab %}

{% tab title="Viz extension" %}
To open the configuration panel, simply click 'Format extension' in the Marks pane.

<figure><img src="https://1304574535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe2zyseN6XFBaLs6YTcnd%2Fuploads%2Fw5utOJdGi7lwy7cAHLRy%2Fimage.png?alt=media&#x26;token=e238d541-06e2-4d82-aa4e-a08e2c7d4bbf" alt="" width="247"><figcaption><p>Opening the configuration panel in Viz extensions</p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Step 2: Navigate to the Data tab

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/pHEx6g6km0B2CWfcNBoK/Screenshot%202024-07-26%20at%2010.54.43.png" alt=""><figcaption></figcaption></figure>

#### Step 3: Make a Calculation Column

On the left side of the data tab. There is pane that says calculations, expand that menu and click 'Make a calculation' to create one.

<figure><img src="https://1304574535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe2zyseN6XFBaLs6YTcnd%2Fuploads%2FDuApZY1xoH8U8lMwCVyS%2Fimage.png?alt=media&#x26;token=1e24fcee-1576-4ca1-b5fa-cbfcc4bdca41" alt=""><figcaption></figcaption></figure>

#### Step 4: Navigate to the Calculation Box

Navigate to the box that contains Calculation and set the Column Display type to 'Date'

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/aFm3i4GpHcaKLYgA8325/Scherm%C2%ADafbeelding%202025-04-30%20om%2010.40.22.png" alt="" width="563"><figcaption></figcaption></figure>

#### Step 5: Write a calculation like this

{% hint style="success" %}
You can also use InputTables columns to calculate with date fields. For a dynamic updating dates.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/Cwq9hMWcPs8pg7tyoqY0/Scherm%C2%ADafbeelding%202025-04-30%20om%2010.42.19.png" alt=""><figcaption></figcaption></figure>
