Help

How do I add a set number of days to a date?

Topic Labels: Views
41076 35
cancel
Showing results for 
Search instead for 
Did you mean: 
Kyle_Groger
4 - Data Explorer
4 - Data Explorer

Hi,

I’m using Airtable to manage my library. I was hoping I could use it to automatically calculate the due date based on the date I loaned the book out. For example, if I loaned the book on the 5th of October, I want to add 14 days and have a column saying 19 October for due date.

How do I do this?

Regards

35 Replies 35
Caitlin_Davies
4 - Data Explorer
4 - Data Explorer

Matt Bush, you are my hero! :heart_eyes: Thanks for the help, that worked perfectly!!

Molly_Leaf
4 - Data Explorer
4 - Data Explorer

Any updates on if they’ve added a workday function? I’m hoping to use for project management in calculating deadlines automatically.

Valerie_Miles
6 - Interface Innovator
6 - Interface Innovator

Plus 1 for this feature. Real Estate contracts- I need to add a certain number of days to a date, and they cannot END on a weekend or holiday. There can be weekends and holidays in the middle, but it cannot end on one. Would be huge for me, and the millions of people (lender/title/escrow/realtors) in the industry.

Conversely, I also need to be able to subtract a certain number of days from the end date. Should be easy once the above is implemented.

Zach_Felsenstei
Airtable Employee
Airtable Employee

Happy to share that we now have a WORKDAY() function!

The format is WORKDAY(startDate, numDays, [holidays]) and it returns a date that is numDays working days after startDate. Working days automatically exclude weekends, and you can include an an optional list of holidays as a comma-separated string of ISO-formatted dates, e.g.

WORKDAY({Launch date}, 100, '2017-09-04, 2017-10-09, 2017-11-10')


@Valerie_Miles
For real estate contracts, you should now be able to use a formula similar to this:

WORKDAY(DATEADD({Input Date},{Days to Add or Subtract}-1,'days'),1,'2017-09-04')

Let me know if this works!

Jordan_McNamara
4 - Data Explorer
4 - Data Explorer

I’m new to AirTable and trying to create a formula for start date. We have a date field for due date and a number field for lead time. I’d like to create a formula that takes the due date subtracts the number of lead time days to give us a start date. Any help would be appreciated.

Pretty much just as you describe it:

DATEADD({Due Date},-{Lead Time},'day')

If you need business day, try

WORKDAY({Due Date},-{Lead},[optional list of holidays])

hi julian!
this is exactly my problem: i have a start date and the due date is calculated with dateadd. but in calendar view it’s impossible to set the ‘end date field’ based on those fields. do you know of a workaround? thanks!

I’ve just successfully set up a calendar view with an entered field and a formula field and it worked fine - you do have to format the formula field though.

Sharon_L
4 - Data Explorer
4 - Data Explorer

@Julian_Kirkness and @Matt_Bush
I am trying to set up a project and want to use duration (instead of “date”) as a field to set up the schedule. Right now I am manually entering “due date” and then have a formulation for duration days as reference, but I’d like to have it vice versa- where I enter the duration days and the due date will be populated. Is there any way I can do that?

Also, Is there any field where I can link each different tasks as predecessors- such as certain task B cannot start until task A is complete. Any feedback or input you can provide is highly appreciated!

I’m looking for the same thing. My company, a wholesale greenhouse uses “crop times” to calculate ship dates in our production system. I want to set up a similar system for my home garden. A planting date + a crop time (a number of days) = a projected harvest date. This would be pretty handy. In our database at work the dates get converted to week numbers so it is easier to calculate. I might just do a similar solution so I can just do it with integers.