Help

Re: Formula to count down days

2244 0
cancel
Showing results for 
Search instead for 
Did you mean: 
nnnnneil
8 - Airtable Astronomer
8 - Airtable Astronomer

Looking for a suggestion on how to best achieve the following:

I have an order date, say “4th July 2018” and i have 3 workdays in which to complete the order.

I’d like the formula to say “3 days left” or “2 days left” depending on today’s date.

WORKDAY({Order Received},3) will give me the due date. But how to calculate the number of days left until we hit the due date?

35 Replies 35

Hi @Justin_Barrett,

Thanks so much for looking into this and finding the workaround solution - I really appreciate it.

All the best,
David

What’s your current formula using DATETIME_DIFF()?

I had tried DATETIME_DIFF({Warranty Expiry}), TODAY() on the below to work out how many days are left on the warranty, see table excerpt below. I’m pretty new to this so not sure where I’m going wrong!

image

Your screenshot shows a date field and a number field, but no formula field. The formula you listed is written incorrectly, so my gut says you’re going from memory on an old test that you removed from the base. Either that, or you converted the formula field to a number field after the calculation was done.

The DATETIME_DIFF() function requires three arguments: two dates, and a units indicator as a string (e.g. “days”, “weeks”, etc.). To calculate how many days are left between today and a date from a date field, it should look like this:

DATETIME_DIFF(Date, TODAY(), "days")

When I use that on a date field with the dates you listed, here’s the result:

Screen Shot 2020-09-18 at 6.32.27 PM

If you leave the formula field intact, it will update continuously with the remaining days on each warranty.

Ah excellent thanks!

Glad to know that you got the answer you were seeking! If you would, please mark my comment (the one above, not this one) as the solution to your question. This helps others who may be searching with similar questions. Thanks!