# Is there an AQL way to calculate Date + X Days

**URL:** https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069
**Category:** Ask the Community
**Tags:** aql
**Created:** [September 9, 2024, 5:02pm UTC](https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069 "2024-09-09T17:02:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Becca\_Perry](https://community.holistics.io/user_avatar/community.holistics.io/becca_perry/32/1741_2.png) [@Becca\_Perry](https://community.holistics.io/u/Becca_Perry)
#### Post date: [September 9, 2024, 5:02pm UTC](https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069/1 "2024-09-09T17:02:44Z")

</div>

Is there any way to take the value of a date dimension and add a specific number of days? I was trying to add 30 days in an ad hoc dimension, but could not find an AQL function for this. We have transaction dates and want to display the invoice due date (30 days after transaction date, for example) as well.

I’m looking for something like SQL’s DATEADD or BigQuery’s DATETIME\_ADD.

---

<div class="post-metadata">

### Author: ![tan](https://community.holistics.io/user_avatar/community.holistics.io/tan/32/358_2.png) [@tan](https://community.holistics.io/u/tan)
#### Post date: [September 10, 2024, 2:29am UTC](https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069/2 "2024-09-10T02:29:29Z")

</div>

Hi Becca,

AQL supports adding interval to a date, so you can use a `+` sign to add any interval you want to a date column.

 ![CleanShot 2024-09-10 at 09.28.04](https://community.holistics.io/uploads/default/original/2X/8/8b0748568d9ad7c3090324c4dd3fd35b3b6a5a0d.png)

I just realized the documentation for this is missing though. Let me inform the team about this.

Regards,

---

<div class="post-metadata">

### Author: ![Becca\_Perry](https://community.holistics.io/user_avatar/community.holistics.io/becca_perry/32/1741_2.png) [@Becca\_Perry](https://community.holistics.io/u/Becca_Perry)
#### Post date: [September 10, 2024, 1:59pm UTC](https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069/3 "2024-09-10T13:59:03Z")

</div>

Hi Tan,

Perfect! That works!

Thanks,  
Becca

---

<div class="post-metadata">

### Author: ![stonematt](https://community.holistics.io/letter_avatar_proxy/v4/letter/s/bc79bd/32.png) [@stonematt](https://community.holistics.io/u/stonematt)
#### Post date: [September 18, 2024, 6:25pm UTC](https://community.holistics.io/t/is-there-an-aql-way-to-calculate-date-x-days/2069/4 "2024-09-18T18:25:31Z")

</div>

Also works to add a calculated metric like this:

> Forecast end date by adding forecasted days remaining to the most recently received item.

`max(stack_assignment_timing.completed) + interval(tot_dyn_d_remain days)`
