> ## Documentation Index
> Fetch the complete documentation index at: https://support.affinity.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Changing Date Format With Custom Table Calculations

> Help center reference

<Note>**Advanced** — power-user technique.</Note>

In this article, we'll go over how to create custom table calculations **to change the date format** within your Affinity Analytics dashboards.

## Formula examples for easy copying and pasting

As you follow the video above, here are the formulas mentioned that you can easily copy and paste as you create your own custom table calculations: **Important Callout**: Make sure to replace the *`<your_date>`* placeholder with the date-type field you'd like to pull data from (start at 00:42 in the video above).

1. Custom table calculation #1 - **Year**
   ```text theme={null}
   index(split(to_string(<your_date>),"-"),1)
   ```

2. Custom table calculation #2 - **Month**
   ```text theme={null}
   index(split(to_string(<your_date>),"-"),2)
   ```

3. Custom table calculation #3 - **Day**
   ```text theme={null}
   index(split(to_string(<your_date>),"-"),3)
   ```

4. Custom table calculation #4 - **Combined**

   1. **MM-DD-YYYY** would be:

   ```text theme={null}
   concat(${month},"-",${day},"-",${year})
   ```

   2. **DD-MM-YYYY** would be:

   ```text theme={null}
   concat(${day},"-",${month},"-",${year})
   ```

   3. **YYYY-MM-DD** would be:

   ```text theme={null}
   concat(${year},"-",${month},"-",${day})
   ```

   4. **YYYY-DD-MM** would be:

   ```text theme={null}
   concat(${year},"-",${day},"-",${month})
   ```

**Note**: You can switch the order of the tokens within **Custom table calculation #4** depending on your preferred format.
