Help

Re: Calculating Dates - New to Airtable

1855 0
cancel
Showing results for 
Search instead for 
Did you mean: 
ocmac
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello all,

Brand new to Airtable and like what I see so far. 

I am trying to calculate a date from two sets of data.  In Excel I would have use Start Date + Duration - 1 to get the End Date.

I thought I would use the Datetime_Format, but I am getting an #error!  I wrote DateTime_Format({Start Date1}+{Duration}-1, 'M/DD/YYYY')

The Start Date1 is formatted as a Date US (9/5/2023)

Duration is a LookUp field pulling from another tab in same base that is formatted as a number.

I know this is probably something simple, but any help would be appreciated.  Also, a good recommendation for Airtable Resources. 🙂

3 Replies 3

Use the DATEADD() formula. You need to specify what unit of time the duration is.

DATEADD({Start Date}, {Duration}, 'minutes')

 

ocmac
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you, I have a date now instead of an error, but it is not the right date.

For example, the first line in image, should be (1/1/2024 + 9) - 1 = 1/9/2024.

I'm not sure what can have gone wrong there but it seems to be subtracting 1 day instead. Try using an intermediary Duration formula field:

{TD Work Days...} - 1

That should equal 8 for the examples you have posted. Then do the DATEADD formula using this field.