Help

Re: Due Date based on number field (days task should be done before date)

854 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Paul1
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi everyone.

I am trying to calculate a due date based on a specific date minus number of days before.

Example:

The master Date of a trip is 10/01/2022.

I have a column (DAYS BEFORE TRIP) where I enter the number of days that a specific task needs to be done before the trip. I have another Column (DUE DATE) that lists the due date based on that calculation. I need a formula that basically does this…

10/01/2022 - (DAYS BEFORE TRIP) = Due Date

So let’s say I need to book airfare 30 days before the trip. In the DAYS BEFORE TRIP field I would enter 30. My formula with then would calculate and display 09/01/2022 as the due date.

There are so many tasks that I don’t want to have the trip date listed every time so I want to embed the actual date in the formula. I hope this makes sense. Thanks for your help!

Screen Shot 2022-06-15 at 1.09.24 PM

6 Replies 6

Hi @Brian_Paul1
Can you try this formula?

DATEADD('10/1/2022', -{Days Before}, 'days')
Brian_Paul1
5 - Automation Enthusiast
5 - Automation Enthusiast

This seems to be working, but for some reason it’s adding a due date to fields where there is no input yet. Any thoughts or ideas? Thank you!

Screen Shot 2022-06-15 at 1.34.49 PM

IF({Days Before} = '', '', DATETIME_FORMAT(DATEADD('10/1/2022', -{Days Before}, 'days'), 'MM/DD/YYYY'))
Brian_Paul1
5 - Automation Enthusiast
5 - Automation Enthusiast

This worked great! Thank you so much. This formula will come in handy for so many things I work on.

If you want usable dates then use a formula that doesn’t force an output as a string.

IF({Days Before}, DATEADD('10/1/2022', -{Days Before}, 'days'))

Yes, use @Kamille_Parks formula instead of mine.