# Formula to return a date based on a "created" date and a variable

Solved
Jump to Solution
370 3
cancel
Showing results for
Search instead for
Did you mean:
6 - Interface Innovator

Hi all! I am back looking for support with a formula to return a date based on a "created" date and a variable.

So far I've been trying to get an IF statements with a DATETIME_FORMAT included to work, but I'm making no progress...

My Goal: Create a column that shows an Estimated Pickup Date which is either 11 days after the created date, or 6 days after the created date if the "rush" checkbox is ticked.

This is what my columns look like:

Any brilliant minds out there who can point me in the right direction?

Thanks in advance!
Devon

Devon
2 Solutions

Accepted Solutions
6 - Interface Innovator

Hey @Spruce

Check out this video here!  https://youtu.be/NcxcPD1zuaw

This is the formula I used:

IF(Rush,
DATEADD({Created Date}, 6, 'days'),
DATEADD({Created Date}, 11, 'days') )

Steven Da Silva

6 - Interface Innovator

I figured it out! Asking the question helped me realize what the solution was!
For anyone else, here's @stevendasilva 's formula with the addition of DATETIME_FORMAT:

`DATETIME_FORMAT(IF(Rush,DATEADD(Created, 6, 'days'),DATEADD(Created, 11, 'days')),'ll')`
Devon
3 Replies 3
6 - Interface Innovator

Hey @Spruce

Check out this video here!  https://youtu.be/NcxcPD1zuaw

This is the formula I used:

IF(Rush,
DATEADD({Created Date}, 6, 'days'),
DATEADD({Created Date}, 11, 'days') )

Steven Da Silva

6 - Interface Innovator

Oh man thank you so much @stevendasilva for the quick reply! Your suggestion is perfect. The only other thing I'd ask, if you have the time, is if there's a way to format the output without the time and in a "friendly date" format (i.e. Nov 9, 2023), or if I have to create an additional column to convert the date format?

Thank you so much!

Devon
6 - Interface Innovator

I figured it out! Asking the question helped me realize what the solution was!
For anyone else, here's @stevendasilva 's formula with the addition of DATETIME_FORMAT:

`DATETIME_FORMAT(IF(Rush,DATEADD(Created, 6, 'days'),DATEADD(Created, 11, 'days')),'ll')`
Devon