Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to calculate a Date plus or minus a certain number of days

Topic Labels: Formulas
4643 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi all,
I’m sure I’m just missing something easy but here is my problem. I have an employee start date field and a field with numbers of days. I have tasks that need to be done 5 days before the employee starts, 1 day before the employee starts, and so on and so forth. So I want to calculate a field using the Start Day and Number of Days to calculate the Due Date of the task based upon number of days.

So if my start date is 6/20/19 and my Number of days field is -5, I want a formula to return 6/15/19. I have tried the formula below but I get NaN returned. Thanks for any guidance and help!

DATETIME_FORMAT({Start Date},‘MM/DD/YY’)+{Number of days}

2 Replies 2

Date calculations are done using the DATEADD function. In your case, the formula would be:

DATETIME_FORMAT(DATEADD({Start Date}, {Number of days}, 'days'), 'MM/DD/YY')

Full function reference is here:

Thank you so much! That worked!