Help

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

Topic Labels: Formulas
Solved
Jump to Solution
7290 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Elaine_Chan
5 - Automation Enthusiast
5 - Automation Enthusiast

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}

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

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:

See Solution in Thread

2 Replies 2
Justin_Barrett
18 - Pluto
18 - Pluto

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!