In a formula column, the DATE_ADD() function displays a date obtained by adding a number of days to a date-type column. It is useful for calculating a deadline or a follow-up date.
-
Function name:
DATE_ADD()
Syntax
DATE_ADD(date_column, number_of_days)
Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to add within quotes.
- do not use quotes for numbers.
Parameters
| Parameter | Description |
|---|---|
date_column |
The date-type column to which days will be added. |
number_of_days |
The integer number of days to add. Positive to move the date forward, negative to move it backward. |
Example
1. To add 3 days to a sending date:
DATE_ADD($Quote Sending, 3)
2. To move a delivery date back by 4 days:
DATE_ADD($Customer Delivery, -4)
Notes
- The number of days can be negative: the function then subtracts the days instead of adding them.
Return type
The function returns a date.
The output type format of the result can be configured in the output field options of the formula editor. For more details, see Output format options in the Formula Column article.
Business use case
DATE_ADD() automates deadline calculations: follow-up date at D+7, warranty end, payment due date based on an invoice date.
Best practice
When the number of days to add varies according to the record and is already in a column, use DATE_ADDNB() instead of a hardcoded value.