Skip to main content

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.

Advanced — power-user technique.
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
    index(split(to_string(<your_date>),"-"),1)
    
  2. Custom table calculation #2 - Month
    index(split(to_string(<your_date>),"-"),2)
    
  3. Custom table calculation #3 - Day
    index(split(to_string(<your_date>),"-"),3)
    
  4. Custom table calculation #4 - Combined
    1. MM-DD-YYYY would be:
    concat(${month},"-",${day},"-",${year})
    
    1. DD-MM-YYYY would be:
    concat(${day},"-",${month},"-",${year})
    
    1. YYYY-MM-DD would be:
    concat(${year},"-",${month},"-",${day})
    
    1. YYYY-DD-MM would be:
    concat(${year},"-",${day},"-",${month})
    
Note: You can switch the order of the tokens within Custom table calculation #4 depending on your preferred format.